{
IDataSet currentDataSet = databaseConnection.get().createDataSet();
final String[] excludeTables = dbunitConfigurationInstance.get().getExcludeTablesFromComparisonWhenEmptyExpected();
if (excludeTables.length != 0)
{
currentDataSet = new FilteredDataSet(new ExcludeTableFilter(excludeTables), currentDataSet);
}
final IDataSet expectedDataSet = mergeDataSets(dataSetRegister.get().getExpected());
final DataSetComparator dataSetComparator = new DataSetComparator(compareDataEvent.getSortByColumns(),
compareDataEvent.getColumnsToExclude(), compareDataEvent.getCustomColumnFilters());
dataSetComparator.compare(currentDataSet, expectedDataSet, assertionErrorCollector.get());