DefaultEnvelope implements Envelope<T> { @Override public T payload() { return payload; } DefaultEnvelope(final Metadata metadata, final T payload); @Override Metadata metadata(); @Override T payload();  }
@Test public void shouldReturnPayload() { assertThat(envelopeFrom(metadata, payload).payload(), equalTo(payload)); }