if (results == null || results.isEmpty()) {
System.out.println("No result received within given timeout");
} else {
System.out.println(String.format(HEADER_FORMAT, "Node", "Status"));
for (Node node : results.keySet()) {
ProducerSwitchResult result = results.get(node);
String statusString = "OFF";
if (result.getStatus()) {
statusString = "ON";
}
System.out.println(String.format(OUTPUT_FORMAT, node.getId(), statusString));
}
}