public void testFinalFieldIgnoral() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
// default value is 'enabled', for backwards compatibility
assertTrue(mapper.isEnabled(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS));
mapper.disable(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS);
try {
/*p =*/ mapper.readValue("{\"x\":2}", FixedPoint.class);
fail("Should not try to use final field");
} catch (JsonMappingException e) {
verifyException(e, "unrecognized field \"x\"");