@Test void testCorrelationDataAddedToNewMessage() { assertEquals(correlationData, new HashMap<>(new GenericMessage<>(new Object()).getMetaData())); MetaData newMetaData = MetaData.from(Collections.singletonMap("whatever", new Object())); assertEquals(newMetaData.mergedWith(correlationData), new GenericMessage<>(new Object(), newMetaData).getMetaData()); }
@Override public MetaData getMetaData() { return metaData; }
GenericMessage extends AbstractMessage<T> { @Override public MetaData getMetaData() { return metaData; } }
GenericMessage extends AbstractMessage<T> { @Override public MetaData getMetaData() { return metaData; } GenericMessage(T payload);  GenericMessage(T payload, Map<String, ?> metaData);  GenericMessage(Class<T> declaredPayloadType, T payload, Map<String, ?> metaData);  GenericMessage(String identifier, T payload, Map<String, ?> metaData);  GenericMessage(String identifier, Class<T> declaredPayloadType, T payload, Map<String, ?> metaData); private  GenericMessage(GenericMessage<T> original, MetaData metaData); }
GenericMessage extends AbstractMessage<T> { @Override public MetaData getMetaData() { return metaData; } GenericMessage(T payload);  GenericMessage(T payload, Map<String, ?> metaData);  GenericMessage(Class<T> declaredPayloadType, T payload, Map<String, ?> metaData);  GenericMessage(String identifier, T payload, Map<String, ?> metaData);  GenericMessage(String identifier, Class<T> declaredPayloadType, T payload, Map<String, ?> metaData); private  GenericMessage(GenericMessage<T> original, MetaData metaData); static Message<?> asMessage(Object payloadOrMessage); @Override MetaData getMetaData(); @Override T getPayload(); @Override Class<T> getPayloadType(); @Override SerializedObject<R> serializePayload(Serializer serializer, Class<R> expectedRepresentation); @Override SerializedObject<R> serializeMetaData(Serializer serializer, Class<R> expectedRepresentation); }
GenericMessage extends AbstractMessage<T> { @Override public MetaData getMetaData() { return metaData; } GenericMessage(T payload);  GenericMessage(T payload, Map<String, ?> metaData);  GenericMessage(Class<T> declaredPayloadType, T payload, Map<String, ?> metaData);  GenericMessage(String identifier, T payload, Map<String, ?> metaData);  GenericMessage(String identifier, Class<T> declaredPayloadType, T payload, Map<String, ?> metaData); private  GenericMessage(GenericMessage<T> original, MetaData metaData); static Message<?> asMessage(Object payloadOrMessage); @Override MetaData getMetaData(); @Override T getPayload(); @Override Class<T> getPayloadType(); @Override SerializedObject<R> serializePayload(Serializer serializer, Class<R> expectedRepresentation); @Override SerializedObject<R> serializeMetaData(Serializer serializer, Class<R> expectedRepresentation);  }