ImageTable { static Iterable<Table.Cell<String, String, String>> combineHeadersWithLinePartsAsTableCells( int index, Iterable<String> headers, Iterable<String> lineParts ) { final String rowKey = "" + index; return transform(zip(headers, lineParts), new Function<Map.Entry<String, String>, Table.Cell<String, String, String>>() { @Override public Table.Cell<String, String, String> apply(Map.Entry<String, String> entry) { return Tables.immutableCell(rowKey, entry.getKey(), entry.getValue()); } }); } ImageTable(Table<String, String, String> table); static ImageTable fromCsvResource(String resource); ImageTableQuery query(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test @SuppressWarnings("unchecked") public void testCombineHeadersWithLinePartsAsTableCells() { final ImmutableList<String> headers = ImmutableList.of("a", "b"); final ImmutableList<String> lineParts = ImmutableList.of("1", "2"); Iterable<Table.Cell<String, String, String>> cells = ImageTable.combineHeadersWithLinePartsAsTableCells(0, headers, lineParts); assertThat(cells).contains(Tables.immutableCell("0", "a", "1")); }