@Test
public void testMakeTable() throws IOException, KaramelException {

  Settings.CB_CLASSPATH_MODE = true;
  String ymlString = Resources.toString(Resources.getResource("se/kth/karamel/client/model/test-definitions/hopsworks.yml"), Charsets.UTF_8);
  JsonCluster definition = ClusterDefinitionService.yamlToJsonObject(ymlString);
  ClusterRuntime dummyRuntime = MockingUtil.dummyRuntime(definition);
  List<MachineRuntime> machines = dummyRuntime.getGroups().get(1).getMachines();
  String[] columnNames = {"Machine", "Public IP", "Private IP", "SSH Port", "SSH User", "Life Status", "Task Status"};
  String[][] data = new String[machines.size()][columnNames.length];
  for (int i = 0; i < machines.size(); i++) {
    MachineRuntime machine = machines.get(i);
    data[i][0] = machine.getName();
    data[i][1] = "<a kref='shellconnect " + machine.getPublicIp() + "'>" + machine.getPublicIp() + "</a>";
    data[i][2] = machine.getPrivateIp();
    data[i][3] = machine.getSshPort() + "";
    data[i][4] = machine.getSshUser();
    data[i][5] = machine.getLifeStatus() + "";
    data[i][6] = machine.getTasksStatus() + "";
  }
  String table = TextTable.makeTable(columnNames, 0, data, true);
  System.out.println(table);
  table = TextTable.makeTable(columnNames, 0, data, false);
  System.out.println(table);
}