### Question:
KnoxShellTable { public static KnoxShellTableBuilder builder() { return new KnoxShellTableBuilder(); } KnoxShellTable(); KnoxShellTable title(String title); KnoxShellTable header(String header); KnoxShellTable row(); KnoxShellTable value(Comparable<? extends Object> value); KnoxShellTableCell<? extends Comparable<? extends Object>> cell(int colIndex, int rowIndex); List<Comparable<? extends Object>> values(int colIndex); List<Comparable<? extends Object>> values(String colName); double mean(String colName); double mean(int colIndex); double median(String colName); double median(int colIndex); double mode(String colName); double mode(int colIndex); double sum(String colName); double sum(int colIndex); double max(String colName); double max(int colIndex); double min(String colName); double min(int colIndex); KnoxShellTable apply(KnoxShellTableCell<? extends Comparable<? extends Object>> cell); List<String> getHeaders(); List<List<Comparable<? extends Object>>> getRows(); String getTitle(); long getId(); static KnoxShellTableBuilder builder(); List<KnoxShellTableCall> getCallHistoryList(); String getCallHistory(); String rollback(); KnoxShellTable replayAll(); KnoxShellTable replay(int step); static KnoxShellTable replay(long id, int step); KnoxShellTableFilter filter(); KnoxShellTableAggregator aggregate(); KnoxShellTable select(String cols); KnoxShellTable sort(String colName); KnoxShellTable sortNumeric(String colName); KnoxShellTable sort(String colName, SortOrder order); KnoxShellTable sort(List<Comparable<? extends Object>> col,
      SortOrder order); @Override String toString(); String toJSON(); String toJSON(boolean data); String toJSON(String path); String toJSON(boolean data, String path); String toCSV(); String toCSV(String filePath);  }### Answer:
@Test public void testCSVStringToTable() throws IOException { String initialString = "colA, colB, colC\nvalue1, value2. value3\nvalue4, value5, value6"; KnoxShellTable table = KnoxShellTable.builder().csv().withHeaders().string(initialString); assertEquals(table.rows.size(), 2); }
@Test public void testFromJSONUsingCallHistory() throws IOException { final String jsonPath = KnoxShellTableCallHistoryTest.class.getClassLoader().getResource("knoxShellTableCallHistoryWithFiltering.json").getPath(); final String csvPath = "file: String json = (FileUtils.readFileToString(new File(jsonPath), StandardCharsets.UTF_8)); json = json.replaceAll("CSV_FILE_PATH_PLACEHOLDER", csvPath); final KnoxShellTable table = KnoxShellTable.builder().json().fromJson(json); assertNotNull(table); assertEquals(4, table.rows.size()); }