### Question:
AllServersOnStrategy implements PowerButtonStrategy { @Override public List<Host> getPowerButtonsToPress(ClusterState clusterState) { return clusterState.getTurnedOffHosts(); } AllServersOnStrategy(); @Override List<Host> getPowerButtonsToPress(ClusterState clusterState);  }### Answer:
@Test public void getPowerButtonsToPressReturnsTheServersThatAreOff() { List<Host> hostsToPress = allServersOnStrategy.getPowerButtonsToPress(getClusterStateWithSomeServersOff()); List<String> hostnamesOffServers = new ArrayList<>(); for (Host host: hostsToPress) { hostnamesOffServers.add(host.getHostname()); } assertTrue(hostnamesOffServers.contains("host3")); assertTrue(hostnamesOffServers.contains("host4")); }
@Test public void getPowerButtonsToPressReturnsEmptyListWhenAllTheServersAreOn() { assertEquals(0, allServersOnStrategy.getPowerButtonsToPress(getClusterStateWithAllServersOn()).size()); }