@Test
public void shouldValidateAResponsetEnvelope() throws Exception {

    final String actionName = "example.action-name";
    final JsonEnvelope jsonEnvelope = mock(JsonEnvelope.class);
    final Optional<MediaType> mediaType = of(mock(MediaType.class));
    when(envelopeInspector.getActionNameFor(jsonEnvelope)).thenReturn(actionName);
    when(mediaTypeProvider.getResponseMediaType(actionName)).thenReturn(mediaType);
    requestResponseEnvelopeValidator.validateResponse(jsonEnvelope);
    verify(envelopeValidator).validate(jsonEnvelope, actionName, mediaType);
}