@Test
public void shouldDoNothingIfTheEnvelopePayloadIsNull() throws Exception {

    final String actionName = "example.action-name";
    final Optional<MediaType> mediaType = of(new MediaType("application/vnd.example.action-name+json"));
    final JsonEnvelope jsonEnvelope = mock(JsonEnvelope.class);
    when(jsonEnvelope.payload()).thenReturn(NULL);
    envelopeValidator.validate(jsonEnvelope, actionName, mediaType);
    verifyZeroInteractions(objectMapper);
    verifyZeroInteractions(jsonSchemaValidator);
}