private List<String> validateTable(Table table, boolean shouldTrim) {
    String tableAsString = table.buildTable();
    List<String> lines = asList(tableAsString.split(GfshParser.LINE_SEPARATOR));

    for (String line : lines) {
      if (shouldTrim) {
        assertThat(line.length()).isLessThanOrEqualTo(SCREEN_WIDTH);
      } else {
        assertThat(line.length()).satisfiesAnyOf(
            length -> assertThat(length).isZero(),
            length -> assertThat(length).isGreaterThan(SCREEN_WIDTH));
      }
    }

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