I am workin with DBunit and I use assertSame(input,myqueryDataSet); the input file has empty rows and myqueryDataSet which is of type queryDataSet shouldn´t return any row, but in some cases does. What I want to do is to catch the error message which explain why and where the error ocurred and save this error in a file and to do this without stopping the Test, the test end when the error ocurr.
I have tried to use DiffCollectingFailureHandler and stop the test and it still has to run because I have an array that contains 3 queries that must be executed.
I have attached the function where I make all this comparisons.
Thanks in advance.