DiffCollectingFailureHandler failureHandler = new DiffCollectingFailureHandler();
Assertion.assertEquals(expectedTable, actualTable, failureHandler);
List differenceList = failureHandler.getDiffList();
if (!differenceList.isEmpty()) {
for (Object obj : differenceList) {
Difference difference = (Difference) obj;
log.info("Column={}, expected={}, actual={},", difference.getColumnName(),
difference.getExpectedValue(), difference.getActualValue());
}
Assert.fail("Data for table " + actualTable.getTableMetaData().getTableName() + " doesn't match expected values");
}
}