@Test
public void parseJsonRepresentationWithInvalidEntityType() {

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