### Question:
Row { public Map<String, Row> getColumnsGroupedByDestination() { Map<String, List<Map.Entry<String, Column>>> grouped = this.columnByName.entrySet().stream().collect(Collectors.groupingBy(e -> e.getValue().getTargetSink())); return grouped.entrySet().stream(). collect(Collectors.toMap(k -> k.getKey(), v -> convert(v.getValue()))); } Row(); void useMemory(Memory globalMemory); Object getColumnValue(String columnName); Column getColumnByName(String column); void findColumnsAndApply(Predicate<Column> predicate, Consumer<Column> modifier); void findColumnsAndChangeName(Predicate<Column> predicate, Function<Column, String> renamingFunction); Column getColumnByIndex(int index); Collection<Column> getColumns(); List<Column> getColumnsSortedByColumnIndex(); void changeColumnName(String oldName, String newName); Row addColumn(int index, String name, Object value); Row addColumn(Column column); Row addNullColumn(int index, String name); void transformColumn(String name, Function<Object, Object> transformer); int getNumberOfColumns(); Map<String, Optional<Object>> getColumnValues(); Set<String> getColumnNames(); Map<String, String> getColumnsAsString(); Row removeColumn(String name); String getDestination(String columnName); boolean isNumber(String column); boolean isString(String column); Row changeDestination(String column, String newDestination); boolean isEmpty(); List<String> getSortedColumnNames(); Map<String, Row> getColumnsGroupedByDestination(); Row convert(List<Map.Entry<String, Column>> content); boolean isColumnEmpty(String name); Row add(Row input); List<Row> getChildren(); boolean hasChildren(); Memory getMemory(); void successfullyProcessed(); void errorOccured(); void errorOccured(Throwable ex); void reindexColumns(); @Override String toString();  }### Answer:
@Test public void getColumnsGroupedByDestination() { this.cut.addColumn(0, "name", "duke"); this.cut.addColumn(0, "city", "SFO"); this.cut.changeDestination("name", "LA"); Map<String, Row> grouped = this.cut.getColumnsGroupedByDestination(); assertThat(grouped.keySet().size(), is(2)); }