@Test
public void testMarshal() throws Exception {

    Marshaller marshaller = new JsonMarshaller();
    Map<String, Object> map = new HashMap<>();
    map.put(EventConstants.TIMESTAMP, EXPECTED_TIMESTAMP);
    map.put("c", "d");
    String jsonSt = marshaller.marshal(new Event(EXPECTED_TOPIC, map));
    System.out.println(jsonSt);
    JsonReader reader = Json.createReader(new StringReader(jsonSt));
    JsonObject jsonO = reader.readObject();
    Assert.assertEquals("Timestamp string", "2016-02-02T15:59:40,634Z",jsonO.getString("@timestamp"));
    long ts = jsonO.getJsonNumber(EventConstants.TIMESTAMP).longValue();
    Assert.assertEquals("timestamp long", EXPECTED_TIMESTAMP, ts);
    Assert.assertEquals("Topic", EXPECTED_TOPIC, jsonO.getString(EventConstants.EVENT_TOPIC.replace('.', '_')));
}