@Test void testWithMetaData() { Map<String, String> metaData = Collections.singletonMap("k1", "v2"); SubscriptionQueryUpdateMessage<Object> original = new GenericSubscriptionQueryUpdateMessage<>( new GenericMessage<>("payload", metaData)); Map<String, String> newMetaData = Collections.singletonMap("k2", "v3"); SubscriptionQueryUpdateMessage<Object> result = original.withMetaData(newMetaData); assertEquals(original.getPayload(), result.getPayload()); assertEquals(newMetaData, result.getMetaData()); }
@Override public GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); }
GenericSubscriptionQueryUpdateMessage extends GenericResultMessage<U> implements SubscriptionQueryUpdateMessage<U> { @Override public GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); } }
GenericSubscriptionQueryUpdateMessage extends GenericResultMessage<U> implements SubscriptionQueryUpdateMessage<U> { @Override public GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); } GenericSubscriptionQueryUpdateMessage(U payload);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, U payload);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, U payload, Map<String, ?> metaData);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, Throwable exception, Map<String, ?> metaData); protected  GenericSubscriptionQueryUpdateMessage(Message<U> delegate); }
GenericSubscriptionQueryUpdateMessage extends GenericResultMessage<U> implements SubscriptionQueryUpdateMessage<U> { @Override public GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); } GenericSubscriptionQueryUpdateMessage(U payload);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, U payload);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, U payload, Map<String, ?> metaData);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, Throwable exception, Map<String, ?> metaData); protected  GenericSubscriptionQueryUpdateMessage(Message<U> delegate); @SuppressWarnings("unchecked") static SubscriptionQueryUpdateMessage<T> asUpdateMessage(Object payload); static SubscriptionQueryUpdateMessage<T> asUpdateMessage(Class<T> declaredType, Throwable exception); @Override GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData); @Override GenericSubscriptionQueryUpdateMessage<U> andMetaData(Map<String, ?> metaData); }
GenericSubscriptionQueryUpdateMessage extends GenericResultMessage<U> implements SubscriptionQueryUpdateMessage<U> { @Override public GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); } GenericSubscriptionQueryUpdateMessage(U payload);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, U payload);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, U payload, Map<String, ?> metaData);  GenericSubscriptionQueryUpdateMessage(Class<U> declaredType, Throwable exception, Map<String, ?> metaData); protected  GenericSubscriptionQueryUpdateMessage(Message<U> delegate); @SuppressWarnings("unchecked") static SubscriptionQueryUpdateMessage<T> asUpdateMessage(Object payload); static SubscriptionQueryUpdateMessage<T> asUpdateMessage(Class<T> declaredType, Throwable exception); @Override GenericSubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData); @Override GenericSubscriptionQueryUpdateMessage<U> andMetaData(Map<String, ?> metaData);  }