### Question:
AbstractEvent implements Event { public static <T extends Event> T newEvent(final Class<T> eventClass, final String serializedEvent) { try { return MAPPER.readValue(serializedEvent, eventClass); } catch (final IOException e) { throw new IllegalStateException("Could not instantiate event " + eventClass.getName()); } }  @Override abstract String type(); static T newEvent(final Class<T> eventClass, final String serializedEvent); @Override final String serialize();  }### Answer:
@Test public void shouldReturnNewEvent_withSerailisedEvent() { final String value = Randoms.randomString(10); final String serializedString = "{\"value\":\"" + value + "\"}"; final StubDomainEvent event = AbstractEvent.newEvent(StubDomainEvent.class, serializedString); Assert.assertEquals(value, event.getValue()); }