@Test
public void testToMapNormalized() {

    long timestampMillis = System.currentTimeMillis();
    EventHeaderProtos.Header header = EventHeaderProtos.Header.newBuilder().build();
    DataAccessEventProtos.FsEvent.Builder fsEvent = DataAccessEventProtos.FsEvent.newBuilder()
            .setSrcPath("hdfs://root/src_file")
            .setDstPath("hdfs://root/dst_file")
            .setAction("FS_RENAME")
            .setHdfsUser("mathieu")
            .setUri("hdfs://root");
    GarmadonMessage message = new GarmadonMessage(GarmadonSerialization.TypeMarker.FS_EVENT, timestampMillis, header, fsEvent.build(), null);
    Map<String, Object> map = message.toMap(false, false);
    HashMap<Object, Object> expected = new HashMap<>();
    // scheme and host removed
    expected.put("src_path", "/src_file");
    expected.put("dst_path", "/dst_file");
    // normalized uri
    expected.put("uri", "hdfs://preprod-pa4");
    expected.put("hdfs_user", "mathieu");
    expected.put("action", "FS_RENAME");
    expected.put("timestamp", timestampMillis);
    TestCase.assertEquals(expected, map);
}