mercredi 22 août 2018

How do I write a test for a simple configuration class?

Every class in my code needs to be at least 60% tested. I'm having trouble understanding how to test simple configuration classes like the one below. Can anyone point me in the right direction?

@Configuration
public class JsonConfiguration {

   @Bean
   @Primary
   public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {
       ObjectMapper objectMapper = builder.build();
       objectMapper.registerModule(new JavaTimeModule());
       return objectMapper;
   }
}

Aucun commentaire:

Enregistrer un commentaire