Search in sources :

Example 1 with ApiClusterRef

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;
}
Also used : ApiService(com.cloudera.api.swagger.model.ApiService) ApiClusterRef(com.cloudera.api.swagger.model.ApiClusterRef)

Aggregations

ApiClusterRef (com.cloudera.api.swagger.model.ApiClusterRef)1 ApiService (com.cloudera.api.swagger.model.ApiService)1