TimesheetEntryRowProcessor implements BackupRowProcessor { @Override public List<Map<String, Object>> processRows(List<Map<String, Object>> rows) { for (Map<String, Object> row : rows) { if (!row.containsKey(UPDATE_DATE) || row.get(UPDATE_DATE) == null) { row.put(UPDATE_DATE, row.get(ENTRY_DATE)); } } return rows; }  @Override List<Map<String, Object>> processRows(List<Map<String, Object>> rows);  }
@SuppressWarnings("unchecked") @Test public void processRow() { Map<String, Object> map = new LinkedHashMap<>(1); map.put("ENTRY_DATE", "12"); Map<String, Object> map1 = new LinkedHashMap<>(2); map1.put("ENTRY_DATE", "13"); map1.put("UPDATE_DATE", "14"); List<Map<String, Object>> rows = Arrays.asList(map, map1); new TimesheetEntryRowProcessor().processRows(rows); assertEquals("12", rows.get(0).get("UPDATE_DATE")); assertEquals("14", rows.get(1).get("UPDATE_DATE")); }