@TestWithResources public class TestsWithJackson { @WithJacksonMapper ObjectMapper objectMapper = new ObjectMapper() .registerModule(new JavaTimeModule()); /* JSON */ @GivenJsonResource("/com/adelean/junit/jupiter/sponge-bob.json") Map<String, Object> jsonAsMap; @GivenJsonResource("/com/adelean/junit/jupiter/sponge-bob.json") JsonNode jsonNode; @GivenJsonResource("/com/adelean/junit/jupiter/sponge-bob.json") Person spongeBob; /* JSONL */ @GivenJsonLinesResource("/com/adelean/junit/jupiter/logs.jsonl") Log[] logsAsArray; @GivenJsonLinesResource("/com/adelean/junit/jupiter/logs.jsonl") Collection<Log> logsAsCollection; }