@Test
public void cloneListOfHostsTest() {

    VmResources vm1Host1 = new VmResources(0, 0, 0, 0);
    List<VmResources> vmsHost = new ArrayList<VmResources>();
    vmsHost.add(vm1Host1);
    HostResources host = new HostResources();
    host.setHostId(1l);
    host.setVmsResources(vmsHost);
    List<HostResources> hosts = new ArrayList<HostResources>();
    hosts.add(host);
    List<HostResources> clonedHosts = spyAlgorithm.cloneListOfHosts(hosts);
    Assert.assertNotNull(clonedHosts);
    Assert.assertEquals(hosts.size(), clonedHosts.size());
    Assert.assertNotEquals(hosts, clonedHosts);
    HostResources clonedHost = clonedHosts.get(0);
    Assert.assertNotNull(clonedHost);
    Assert.assertEquals(host.getHostId(), clonedHost.getHostId());
    Assert.assertNotEquals(host, clonedHost);
    Assert.assertNotNull(clonedHost.getVmsResources());
    Assert.assertEquals(vmsHost.size(), clonedHost.getVmsResources().size());
    Assert.assertEquals(vmsHost.get(0), clonedHost.getVmsResources().get(0));
    Mockito.verify(spyAlgorithm).cloneHostVmsList(host);
}