@Test
public void testEventSerializerNullToken()
        throws Exception
{

    expectedEventJson.remove("traceToken");
    JsonEventSerializer eventSerializer = new JsonEventSerializer(new NodeInfo("test"), FixedDummyEventClass.class);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    JsonGenerator jsonGenerator = new JsonFactory().createGenerator(out, JsonEncoding.UTF8);
    FixedDummyEventClass event = TestingUtils.getEvents().get(0);
    eventSerializer.serialize(event, null, jsonGenerator);
    String json = out.toString(UTF_8.name());
    assertEquals(new ObjectMapper().readValue(json, Object.class), expectedEventJson, "JSON encoding " + json);
}