public void testIgnoreOver() throws Exception {
  ObjectMapper m=new ObjectMapper();
  Map<String,Object> result=writeAndMap(m,new BaseClassIgnore());
  assertEquals(1,result.size());
  assertEquals(Integer.valueOf(2),result.get("y"));
  result=writeAndMap(m,new SubClassNonIgnore());
  assertEquals(2,result.size());
  assertEquals(Integer.valueOf(3),result.get("x"));
  assertEquals(Integer.valueOf(2),result.get("y"));
}

public void testIgnoreOver ( ) throws Exception { ObjectMapper m = new ObjectMapper ( ) ; Map < String , Object > result = writeAndMap ( m , new BaseClassIgnore ( ) ) ; assertEquals ( 1 , result . size ( ) ) ; assertEquals ( Integer . valueOf ( 2 ) , result . get ( "y" ) ) ; result = writeAndMap ( m , new SubClassNonIgnore ( ) ) ; assertEquals ( 2 , result . size ( ) ) ; assertEquals ( Integer . valueOf ( 3 ) , result . get ( "x" ) ) ; assertEquals ( Integer . valueOf ( 2 ) , result . get ( "y" ) ) ; }
test case to verify that ignore tag can also be disabled via inheritance
