@Test void testAndMetaData() { MetaData metaData = MetaData.from(Collections.<String, Object>singletonMap("key", "value")); ResetContext<Object> startMessage = new GenericResetContext<>(TEST_PAYLOAD, metaData); ResetContext<Object> messageOne = startMessage.andMetaData(MetaData.emptyInstance()); ResetContext<Object> messageTwo = startMessage.andMetaData(MetaData.from(Collections.singletonMap("key", (Object) "otherValue"))); assertEquals(1, messageOne.getMetaData().size()); assertEquals("value", messageOne.getMetaData().get("key")); assertEquals(1, messageTwo.getMetaData().size()); assertEquals("otherValue", messageTwo.getMetaData().get("key")); }
@Override public GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData) { return new GenericResetContext<>(getDelegate().andMetaData(additionalMetaData)); }
GenericResetContext extends MessageDecorator<T> implements ResetContext<T> { @Override public GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData) { return new GenericResetContext<>(getDelegate().andMetaData(additionalMetaData)); } }
GenericResetContext extends MessageDecorator<T> implements ResetContext<T> { @Override public GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData) { return new GenericResetContext<>(getDelegate().andMetaData(additionalMetaData)); } GenericResetContext(T payload);  GenericResetContext(T payload, Map<String, ?> metaData);  GenericResetContext(Message<T> message); }
GenericResetContext extends MessageDecorator<T> implements ResetContext<T> { @Override public GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData) { return new GenericResetContext<>(getDelegate().andMetaData(additionalMetaData)); } GenericResetContext(T payload);  GenericResetContext(T payload, Map<String, ?> metaData);  GenericResetContext(Message<T> message); @SuppressWarnings("unchecked") static ResetContext<T> asResetContext(Object messageOrPayload); @Override GenericResetContext<T> withMetaData(Map<String, ?> metaData); @Override GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData); }
GenericResetContext extends MessageDecorator<T> implements ResetContext<T> { @Override public GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData) { return new GenericResetContext<>(getDelegate().andMetaData(additionalMetaData)); } GenericResetContext(T payload);  GenericResetContext(T payload, Map<String, ?> metaData);  GenericResetContext(Message<T> message); @SuppressWarnings("unchecked") static ResetContext<T> asResetContext(Object messageOrPayload); @Override GenericResetContext<T> withMetaData(Map<String, ?> metaData); @Override GenericResetContext<T> andMetaData(Map<String, ?> additionalMetaData);  }