private Table createTableStructure(int columnCount, String separator, String... columnNames) {
    Table resultTable = tableBuilder.newTable(screen);
    resultTable.setTabularResult(true);
    resultTable.setColumnSeparator(separator);

    resultTable.newBlankRow();
    RowGroup rowGroup = resultTable.newRowGroup();
    Row row = rowGroup.newRow();

    for (int column = 0; column < columnCount; column++) {
      row.newCenterCol(columnNames[column] + column);
    }

    rowGroup.newRowSeparator('-', false);

    return resultTable;
  }
Test Variations table-wide separator true false
geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/result/TableBuilderTest.java