ScoredClustersAllocationAlgorithmPreferenceForSmallHosts extends AllocationAlgorithmBase { protected void sortHosts(List<HostResources> hosts) { sortHostsUpwardScore(hosts); }  @Override List<ClusterResourcesAvailableToStart> rankClustersToAllocation(List<ClusterResourcesAvailableToStart> clustersAvailableToStart); @Override List<HostResources> rankHostsToStart(List<HostResources> hostsResources);  }
@Test public void sortHostsTest() { List<HostResources> hosts = new ArrayList<HostResources>(); Mockito.doNothing().when(spyAlgorithm).sortHostsUpwardScore(hosts); spyAlgorithm.sortHosts(hosts); Mockito.verify(spyAlgorithm).sortHostsUpwardScore(hosts); }