@Test
public void getClusterIdleHostsTest() {

    ClusterVO cluster = createCluster(null);
    List<HostResources> hosts = createHosts(2);
    List<VmResources> vmsResources = new ArrayList<>();
    vmsResources.add(new VmResources(0l, 1, 1000, 1000));
    hosts.get(0).setVmsResources(vmsResources);
    Mockito.doReturn(hosts).when(administrationAgent).getClusterUpHosts(Mockito.any(ClusterVO.class));
    List<HostResources> result = administrationAgent.getClusterIdleHosts(cluster);
    Mockito.verify(administrationAgent).getClusterUpHosts(Mockito.any(ClusterVO.class));
    Assert.assertEquals(1, result.size());
    Assert.assertEquals(hosts.get(1), result.get(0));
}