AllocationAlgorithmBase implements AllocationAlgorithm { @Override public List<ClusterResourcesAvailableToStart> rankClustersToAllocation(List<ClusterResourcesAvailableToStart> clusters) { return cloneListOfClusters(clusters); }  @Override List<ClusterResourcesAvailableToStart> rankClustersToAllocation(List<ClusterResourcesAvailableToStart> clusters); @Override boolean needsToActivateHost(CloudResources cloudCapacity); @Override List<HostResources> rankHostsToStart(List<HostResources> hostsResources);  }
@Test public void rankClustersToAllocationTest() { List<ClusterResourcesAvailableToStart> clusters = new ArrayList<ClusterResourcesAvailableToStart>(); Mockito.doReturn(clusters).when(spyAlgorithm).cloneListOfClusters(clusters); List<ClusterResourcesAvailableToStart> clonedClustersToAllocation = spyAlgorithm.rankClustersToAllocation(clusters); Mockito.verify(spyAlgorithm).cloneListOfClusters(clusters); Assert.assertEquals(clusters, clonedClustersToAllocation); }