@Test
public void rankHostsToStartTest() {

    List<HostResources> hosts = createHostsWithScore();
    Mockito.doReturn(hosts).when(spyAlgorithm).cloneListOfHosts(hosts);
    Mockito.doReturn(hosts).when(spyAlgorithm).setEachHostScore(hosts);
    Mockito.doNothing().when(spyAlgorithm).sortHosts(hosts);
    spyAlgorithm.rankHostsToStart(hosts);
    InOrder inOrder = Mockito.inOrder(spyAlgorithm);
    inOrder.verify(spyAlgorithm).cloneListOfHosts(hosts);
    inOrder.verify(spyAlgorithm).setEachHostScore(hosts);
    inOrder.verify(spyAlgorithm).sortHosts(hosts);
}