TableDiffer { public DataTableDiff calculateDiffs() { Map<Integer, Delta> deltasByLine = createDeltasByLine(); return createTableDiff(deltasByLine); } TableDiffer(DataTable fromTable, DataTable toTable); DataTableDiff calculateDiffs(); DataTableDiff calculateUnorderedDiffs();  }
@Test void considers_same_table_as_equal() { assertTrue(new TableDiffer(table(), table()).calculateDiffs().isEmpty()); }
@Test void should_not_fail_with_out_of_memory() { DataTable expected = TableParser.parse("" + "| I'm going to work |\n"); List<List<String>> actual = new ArrayList<>(); actual.add(singletonList("I just woke up")); actual.add(singletonList("I'm going to work")); new TableDiffer(expected, DataTable.create(actual)).calculateDiffs(); }