DataTable { public List<List<String>> cells() { return raw; } private  DataTable(List<List<String>> raw, TableConverter tableConverter); static DataTable create(List<List<String>> raw); static DataTable create(List<List<String>> raw, TableConverter tableConverter); static DataTable emptyDataTable(); TableConverter getTableConverter(); void diff(DataTable actual); void unorderedDiff(DataTable actual); List<String> asList(); List<T> asList(Type itemType); List<List<String>> asLists(); List<List<String>> cells(); List<List<T>> asLists(Type itemType); Map<K, V> asMap(Type keyType, Type valueType); List<Map<String, String>> asMaps(); List<Map<K, V>> asMaps(Type keyType, Type valueType); String cell(int row, int column); List<String> column(final int column); DataTable columns(final int fromColumn); DataTable columns(final int fromColumn, final int toColumn); T convert(Type type, boolean transposed); @Override boolean equals(Object o); @Override int hashCode(); boolean isEmpty(); List<String> row(int row); DataTable rows(int fromRow); DataTable rows(int fromRow, int toRow); DataTable subTable(int fromRow, int fromColumn); DataTable subTable(int fromRow, int fromColumn, int toRow, int toColumn); int height(); int width(); @Override String toString(); void print(Appendable appendable); void print(StringBuilder appendable); DataTable transpose();  }
@Test void cells_should_have_three_columns_and_two_rows() { List<List<String>> raw = createSimpleTable().cells(); assertEquals(2, raw.size(), "Rows size"); for (List<String> list : raw) { assertEquals(3, list.size(), "Cols size: " + list); } }
@Test void cells_row_is_immutable() { assertThrows(UnsupportedOperationException.class, () -> createSimpleTable().cells().remove(0)); }
@Test void cells_col_is_immutable() { assertThrows(UnsupportedOperationException.class, () -> createSimpleTable().cells().get(0).remove(0)); }