ConsolidationScoredPreferenceForSmallHosts extends ConsolidationAlgorithmBase { @Override public List<HostResources> rankHosts(List<HostResources> hostsList) { List<HostResources> sortedHosts = cloneListOfHosts(hostsList); this.profiler = new HostProfiler(sortedHosts); setEachHostScore(sortedHosts); sortHosts(sortedHosts); return sortedHosts; }  @Override List<HostResources> rankHosts(List<HostResources> hostsList); @Override List<HostResources> rankHostToPowerOff(List<HostResources> idleHosts);  }
@Test public void rankHostsTest() { spyAlgorithm.rankHosts(createHosts()); InOrder inOrder = Mockito.inOrder(spyAlgorithm); inOrder.verify(spyAlgorithm).cloneListOfHosts(Mockito.anyListOf(HostResources.class)); inOrder.verify(spyAlgorithm).setEachHostScore(Mockito.anyListOf(HostResources.class)); inOrder.verify(spyAlgorithm).sortHosts(Mockito.anyListOf(HostResources.class)); }