@Test
public void shouldGetTheMetadataOfAnEnvelope() throws Exception {

    final JsonEnvelope jsonEnvelope = mock(JsonEnvelope.class);
    final Metadata metadata = mock(Metadata.class);
    when(jsonEnvelope.metadata()).thenReturn(metadata);
    assertThat(envelopeInspector.getMetadataFor(jsonEnvelope), is(metadata));
}