@Test
public void rankHostToPowerOffTest() {

    List<HostResources> hosts = createHosts();
    Mockito.doReturn(hosts).when(spyAlgorithm).setEachHostScore(Mockito.anyListOf(HostResources.class));
    Mockito.doNothing().when(spyAlgorithm).sortHostsDownwardScore(hosts);
    spyAlgorithm.rankHostToPowerOff(hosts);
    InOrder inOrder = Mockito.inOrder(spyAlgorithm);
    inOrder.verify(spyAlgorithm).cloneListOfHosts(Mockito.anyListOf(HostResources.class));
    inOrder.verify(spyAlgorithm).setEachHostScore(Mockito.anyListOf(HostResources.class));
    inOrder.verify(spyAlgorithm).sortHostsDownwardScore(Mockito.anyListOf(HostResources.class));
}