@Test
public void shouldThrowExceptionIfProvidedInvalidEventObject() {

    exception.expect(InvalidEventException.class);
    exception.expectMessage("Failed to map event. No event registered for class java.lang.String");
    enveloper.withMetadataFrom(envelopeFrom(metadataBuilder().withId(randomUUID()).withName("name"), createObjectBuilder())).apply("InvalidEventObject");
}