### Question:
ClusterState { public List<Host> getHostsWithoutVmsAndSwitchedOn() { List<Host> result = new ArrayList<>(); for (Host host: hosts) { if (!host.isOff() && filterVmsByHost(host.getHostname()).size() == 0) { result.add(host); } } return result; } ClusterState(List<Vm> vms, List<Host> hosts); List<Host> getTurnedOffHosts(); List<Host> getHostsWithoutVmsAndSwitchedOn(); int getTotalNumberOfCpusInOnServers();  }### Answer:
@Test public void getHostsWithoutVmsAndSwitchedOn() { assertEquals(1, getTestClusterState().getHostsWithoutVmsAndSwitchedOn().size()); assertEquals("host2", getTestClusterState().getHostsWithoutVmsAndSwitchedOn().get(0).getHostname()); }