use of com.cloudera.api.swagger.model.ApiClusterRef in project knox by apache.
the class ClouderaManagerServiceDiscoveryTest method createMockApiService.
private static ApiService createMockApiService(String name, String type, String clusterName) {
ApiService s = EasyMock.createNiceMock(ApiService.class);
EasyMock.expect(s.getName()).andReturn(name).anyTimes();
EasyMock.expect(s.getType()).andReturn(type).anyTimes();
ApiClusterRef clusterRef = EasyMock.createNiceMock(ApiClusterRef.class);
EasyMock.expect(clusterRef.getClusterName()).andReturn(clusterName).anyTimes();
EasyMock.replay(clusterRef);
EasyMock.expect(s.getClusterRef()).andReturn(clusterRef).anyTimes();
EasyMock.replay(s);
return s;
}
Aggregations