@Test
public void parseJsonRepresentationWithInvalidDittoHeaders() {

    final JsonValue invalidDittoHeaders = JsonValue.of("dittoHeaders");
    final JsonFieldDefinition<?> dittoHeadersFieldDefinition = Acknowledgements.JsonFields.DITTO_HEADERS;
    final JsonObject jsonRepresentation = JsonFactory.newObjectBuilder(knownAcknowledgements.toJson())
            .set(dittoHeadersFieldDefinition.getPointer(), invalidDittoHeaders)
            .build();
    assertThatExceptionOfType(JsonParseException.class)
            .isThrownBy(() -> underTest.apply(jsonRepresentation))
            .withMessage("Value <%s> for <%s> is not of type <JsonObject>!", invalidDittoHeaders,
                    dittoHeadersFieldDefinition.getPointer())
            .withNoCause();
}