@Test(expectedExceptions = InvalidEventException.class)
public void testUnregisteredEventClass()
        throws Exception
{

    JsonEventSerializer eventSerializer = new JsonEventSerializer(new NodeInfo("test"), DummyEventClass.class);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    JsonGenerator jsonGenerator = new JsonFactory().createGenerator(out, JsonEncoding.UTF8);
    FixedDummyEventClass event = TestingUtils.getEvents().get(0);
    eventSerializer.serialize(event, null, jsonGenerator);
}