Resource.Type type = Resource.Type.Cluster;
AmbariManagementController managementController = createMock(AmbariManagementController.class);
Set<ClusterResponse> allResponse = new HashSet<ClusterResponse>();
allResponse.add(new ClusterResponse(100L, "Cluster100", null, null));
allResponse.add(new ClusterResponse(101L, "Cluster101", null, null));
allResponse.add(new ClusterResponse(102L, "Cluster102", null, null));
allResponse.add(new ClusterResponse(103L, "Cluster103", null, null));
allResponse.add(new ClusterResponse(104L, "Cluster104", null, null));
Set<ClusterResponse> nameResponse = new HashSet<ClusterResponse>();
nameResponse.add(new ClusterResponse(102L, "Cluster102", null, null));
Set<ClusterResponse> idResponse = new HashSet<ClusterResponse>();
idResponse.add(new ClusterResponse(103L, "Cluster103", null, null));
// set expectations
expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(allResponse).once();
expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(idResponse).once();