@Test
public void parseJsonRepresentationWithUnknownStatusCode() {

    final JsonFieldDefinition<Integer> statusCodeFieldDefinition = Acknowledgements.JsonFields.STATUS_CODE;
    final int unknownStatusCode = 19;
    final JsonObject jsonRepresentation = JsonFactory.newObjectBuilder(knownAcknowledgements.toJson())
            .set(statusCodeFieldDefinition, unknownStatusCode)
            .build();
    assertThatExceptionOfType(JsonParseException.class)
            .isThrownBy(() -> underTest.apply(jsonRepresentation))
            .withMessage("Status code <%d> is not supported!", unknownStatusCode)
            .withNoCause();
}