EventMessage implements Event { @Override public Payload getPayload() { return payload; } EventMessage( final OriginMeta origin, final SourceMeta source, final Payload payload ); protected  EventMessage(); @Override OriginMeta getOrigin(); @Override SourceMeta getSource(); @Override Payload getPayload(); @Override long getTimestamp(); @Override void addTrace( final String place ); @JsonIgnore List<TraceMeta> getTrace(); @Override void addCustomMeta( CustomMeta customMeta ); @Override List<CustomMeta> getCustomMetaByKey( final String key );  }
@Test public void testLogPayloadSerializationAndDeserialization() throws IOException { originalObject = new EventMessage( origin, source, logPayload ); final String json = objectMapper.writeValueAsString( originalObject ); System.out.println( json ); final EventMessage restoredObject = objectMapper.readValue( json, EventMessage.class ); assertEquals( originalObject.getPayload(), restoredObject.getPayload() ); }