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