*/
public void testAutoDetectDisable() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
mapper.getSerializationConfig().setAnnotationIntrospector(new JaxbAnnotationIntrospector());
Jackson183Bean bean = new Jackson183Bean();
Map<String,Object> result;
// Ok: by default, should see 2 fields:
result = writeAndMap(mapper, bean);
assertEquals(2, result.size());
assertEquals("a", result.get("a"));
assertEquals("b", result.get("b"));
// But when disabling auto-detection, just one
mapper = new ObjectMapper();
mapper.getSerializationConfig().setAnnotationIntrospector(new JaxbAnnotationIntrospector());
mapper.configure(SerializationConfig.Feature.AUTO_DETECT_GETTERS, false);
result = writeAndMap(mapper, bean);
assertEquals(1, result.size());
assertNull(result.get("a"));
assertEquals("b", result.get("b"));