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 testInvalidJacksonJsonMapperNoJavaTimeModule() {
        assertThatThrownBy(() -> validateJsonMapper(new InvalidJacksonJsonMapper(new ObjectMapper().registerModule(new Jdk8Module()))))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("The JsonMapper you provided cannot be used as it deserializes jobs in an incorrect way.");
        //.hasRootCauseMessage("Java 8 date/time type `java.time.Instant` not supported by default: add Module \"com.fasterxml.jackson.datatype:jackson-datatype-jsr310\" to enable handling (through reference chain: org.jobrunr.jobs.Job[\"jobStates\"]->java.util.Collections$UnmodifiableRandomAccessList[0]->org.jobrunr.jobs.states.ProcessingState[\"createdAt\"])");
    }