@Test public void ensureConfigSerializable() throws Exception { final ObjectMapper mapper = Jackson.newObjectMapper(); mapper .getSubtypeResolver() .registerSubtypes(ServiceFinder.find(AppenderFactory.class).toClassArray()); // Issue-96: some types were not serializable final String json = mapper.writeValueAsString(configuration); assertThat(json).isNotNull(); // and as an added bonus, let's see we can also read it back: final Configuration cfg = mapper.readValue(json, Configuration.class); assertThat(cfg).isNotNull(); }
public ViewBundle() { this(ServiceFinder.find(ViewRenderer.class)); }