/**
* Helper method to verify that the LoadMapper has mapped the specified columns to their correct respective field, along with any constants in the mapping file.
*/
private void verifyMapping(LoadMapper mapper, String... destNames) {
Row destValueMap = mapper.mapData(this.sourceRow);
for (int i = 0; i < destNames.length; i++) {
assertNotNull("Destination# " + i + "(" + destNames[i]
+ ") should have a mapped value",
destValueMap.get(destNames[i]));
assertEquals("Destination# " + i + "(" + destNames[i]
+ ") should contain the expected value", SOURCE_VALUES[i],
destValueMap.get(destNames[i]));
}
// verify constant mapped correctly
assertEquals("Destination[" + DEST_CONSTANT_NAME
+ "] should contain constant", CONSTANT_VALUE,
destValueMap.get(DEST_CONSTANT_NAME));
}