### Question:
FlowEvent implements Jsonable { public <T> T getEventData(Class<T> classType) { return this.data.getValue(type, classType); } FlowEvent(String type);  FlowEvent(String type, AdditionalData data);  FlowEvent(String type, AdditionalData data, String eventTrigger); @SuppressWarnings("unchecked") <T> FlowEvent(String type, T eventData); @NonNull String getType(); @NonNull AdditionalData getData(); T getEventData(Class<T> classType); boolean hasEventData(); void setEventTrigger(String eventTrigger); @Nullable String getEventTrigger(); @Nullable String getOriginatingRequestId(); void setOriginatingRequestId(String originatingRequestId); @Nullable String getTarget(); void setTarget(String target); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override String toJson(); static FlowEvent fromJson(String json);  }### Answer:
@Test public void canSetAndGetDomainEventData() { TestEventObjectData data = new TestEventObjectData(); FlowEvent fe = new FlowEvent("blah", data); assertThat(fe.getEventData(TestEventObjectData.class)).isNotNull(); assertThat(fe.getEventData(TestEventObjectData.class)).isEqualTo(data); }
@Test public void shouldReturnNullIfWrongTypeUsed() { TestEventObjectData data = new TestEventObjectData(); FlowEvent fe = new FlowEvent("blah", data); assertThat(fe.getEventData(FlowEvent.class)).isNull(); }