public static JsonMapper validateJsonMapper(JsonMapper jsonMapper) {
        try {
            final String serializedJob = jsonMapper.serialize(getJobForTesting());
            testTimeFields(serializedJob);
            testUseFieldsNotMethods(serializedJob);
            testUsePolymorphism(serializedJob);
            testCanConvertBackToJob(jsonMapper, serializedJob);
            return jsonMapper;
        } catch (Exception e) {
            throw new IllegalArgumentException("The JsonMapper you provided cannot be used as it deserializes jobs in an incorrect way.", e);
        }
    }
@Test
    void testInvalidJacksonJsonMapperPropertiesInsteadOfFields() {
        assertThatThrownBy(() -> validateJsonMapper(new InvalidJacksonJsonMapper(new ObjectMapper()
                        .registerModule(new Jdk8Module())
                        .registerModule(new JavaTimeModule())
                        .setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"))
                ))
        )
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("The JsonMapper you provided cannot be used as it deserializes jobs in an incorrect way.")
                .hasRootCauseMessage("Job Serialization should use fields and not getters/setters.");
    }