title: Spring boot 2 testing json serialzation
body: <p>I have the following test and it works ok.  However in my mind its a bit of an overkill . (takes a while also) to bring up a full instance of spring to test some json serialization.</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  public class WirelessSerializationTest {
  
    @Autowired
    ObjectMapper objectMapper;
  
    @Test
    public void testDateSerialization() throws IOException {
  
      Resource resource = new ClassPathResource("subscription.json");
      File file = resource.getFile();
  
      CustomerSubscriptionDto customerSubscriptionDto = objectMapper.readValue(file, CustomerSubscriptionDto.class);
      LocalDateTime actualResult = customerSubscriptionDto.getEarliestExpiryDate();
  
      LocalDate expectedDate = LocalDate.of(2018, 10, 13);
      LocalTime expectedTime = LocalTime.of( 10, 18, 48);
      LocalDateTime expectedResult = LocalDateTime.of(expectedDate,expectedTime);
      Assert.assertEquals("serialised date ok", expectedResult, actualResult);
  
      String jsonOutput = objectMapper.writeValueAsString(customerSubscriptionDto);
      String expectedExpiryDate = "\"earliestExpiryDate\":\"2018-10-13T10:18:48Z\"";
  
    }
  
  }
  </code></pre>
  
  <p>Now I have been able to simplify it by removing SpringRunner.  However im not loading the springs jackson configs here.</p>
  
  <pre><code>public class WirelessSerializationTest {
  
    //@Autowired
    ObjectMapper objectMapper = new ObjectMapper();
  </code></pre>
  
  <p>So my question is this.  Can I test and load the Springs ObjectMapper instance in the test without needing to load all of Spring up?</p>