File twoRowsFile = new File("src/test/resources/datasync_unit_test_two_rows.csv");
Soda2Publisher.replaceNew(producer, ddl, UNITTEST_DATASET_ID, twoRowsFile, true);
File threeRowsFile = new File("src/test/resources/datasync_unit_test_three_rows_invalid_date.csv");
int numRowsPerChunk = 0;
UpsertResult result = Soda2Publisher.appendUpsert(producer, ddl, UNITTEST_DATASET_ID, threeRowsFile, numRowsPerChunk, true);
TestCase.assertEquals(1, result.errorCount());
TestCase.assertEquals(2, result.getRowsUpdated());
TestCase.assertEquals(0, result.getRowsCreated());
TestCase.assertEquals(2, getTotalRows(UNITTEST_DATASET_ID));
TestCase.assertEquals("Unknown date format 'invalid_date'.", result.getErrors().get(0).getError());
TestCase.assertEquals(2, result.getErrors().get(0).getIndex());
}