protected void verifyErrors(Controller controller, String expectedErrorMessage) throws DataAccessObjectException {
String fileName = controller.getConfig().getString(Config.OUTPUT_ERROR);
final CSVFileReader errReader = new CSVFileReader(fileName, controller);
try {
errReader.open();
for (Row errorRow : errReader.readRowList(errReader.getTotalRows())) {
String actualMessage = (String) errorRow.get("ERROR");
if (actualMessage == null || !actualMessage.startsWith(expectedErrorMessage))
Assert.fail("Error row does not have the expected error message: " + expectedErrorMessage
+ "\n Actual row: " + errorRow);