@Test
public void parseJsonRepresentationWithInvalidAcknowledgements() {

    final JsonFieldDefinition<JsonObject> acknowledgementsFieldDefinition =
            Acknowledgements.JsonFields.ACKNOWLEDGEMENTS;
    final boolean invalidAcknowledgements = true;
    final JsonObject jsonRepresentation = JsonFactory.newObjectBuilder(knownAcknowledgements.toJson())
            .set(acknowledgementsFieldDefinition.getPointer(), invalidAcknowledgements)
            .build();
    assertThatExceptionOfType(JsonParseException.class)
            .isThrownBy(() -> underTest.apply(jsonRepresentation))
            .withMessage("Value <%s> for <%s> is not of type <JsonObject>!", invalidAcknowledgements,
                    acknowledgementsFieldDefinition.getPointer())
            .withNoCause();
}