@Test
public void testHistoryEventIsConvertedToMap() {
Map<String, Object> nonMergedHistoryMap = (Map<String, Object>) historyList.get(0);
Map<String, String> nonMergedHistoryParameters =
(Map<String, String>) nonMergedHistoryMap.get(fields.getHistoryParameters());
assertEquals(
"Linked history map should have an action",
ACTION,
nonMergedHistoryMap.get(fields.getHistoryAction()));
assertEquals(
"Linked history map should have an event type",
EVENT_TYPE,
nonMergedHistoryMap.get(fields.getHistoryType()));
assertEquals(
"History parameters should have kwy1-value1",
"value1",
nonMergedHistoryParameters.get("key1"));
assertEquals(
"Linked history map should have referrer",
REFERRER,
nonMergedHistoryMap.get(fields.getHistoryReferrer()));
assertEquals(
"Linked history map should have timestamp",
currentTimeMillis,
nonMergedHistoryMap.get(fields.getHistoryTimestamp()));
}