json = mapper.writeValueAsString(new EmptyBean());
assertEquals("{\"@type\":\"TestSubtypes$EmptyBean\"}", json);
// and then with defaults
mapper = new ObjectMapper();
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
json = mapper.writeValueAsString(new EmptyNonFinal());
assertEquals("[\"com.fasterxml.jackson.databind.jsontype.TestSubtypes$EmptyNonFinal\",{}]", json);
}