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