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 testInvalidJacksonJsonMapperNoISO8601TimeFormat() {
        assertThatThrownBy(() -> validateJsonMapper(new InvalidJacksonJsonMapper(new ObjectMapper().registerModule(new Jdk8Module()).registerModule(new JavaTimeModule()))))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("The JsonMapper you provided cannot be used as it deserializes jobs in an incorrect way.")
                .hasRootCauseMessage("Timestamps are wrongly formatted for JobRunr. They should be in ISO8601 format.");
    }