@@ -422,6 +422,52 @@ public void testHasAsValue() throws Exception
422
422
.hasAsValue (null ));
423
423
}
424
424
425
+ public void testHasAsKey () throws Exception
426
+ {
427
+ IntrospectorWithMap intr1 = new IntrospectorWithMap ()
428
+ .add ("hasAsKey" , Boolean .TRUE );
429
+ IntrospectorWithMap intr2 = new IntrospectorWithMap ()
430
+ .add ("hasAsKey" , Boolean .FALSE );
431
+ assertNull (new AnnotationIntrospectorPair (NO_ANNOTATIONS , NO_ANNOTATIONS )
432
+ .hasAsKey (null , null ));
433
+ assertEquals (Boolean .TRUE , new AnnotationIntrospectorPair (intr1 , NO_ANNOTATIONS )
434
+ .hasAsKey (null , null ));
435
+ assertEquals (Boolean .TRUE , new AnnotationIntrospectorPair (NO_ANNOTATIONS , intr1 )
436
+ .hasAsKey (null , null ));
437
+ assertEquals (Boolean .FALSE , new AnnotationIntrospectorPair (intr2 , NO_ANNOTATIONS )
438
+ .hasAsKey (null , null ));
439
+ assertEquals (Boolean .FALSE , new AnnotationIntrospectorPair (NO_ANNOTATIONS , intr2 )
440
+ .hasAsKey (null , null ));
441
+
442
+ assertEquals (Boolean .TRUE , new AnnotationIntrospectorPair (intr1 , intr2 )
443
+ .hasAsKey (null , null ));
444
+ assertEquals (Boolean .FALSE , new AnnotationIntrospectorPair (intr2 , intr1 )
445
+ .hasAsKey (null , null ));
446
+ }
447
+
448
+ public void testHasAnyGetter () throws Exception
449
+ {
450
+ IntrospectorWithMap intr1 = new IntrospectorWithMap ()
451
+ .add ("hasAnyGetter" , Boolean .TRUE );
452
+ IntrospectorWithMap intr2 = new IntrospectorWithMap ()
453
+ .add ("hasAnyGetter" , Boolean .FALSE );
454
+ assertNull (new AnnotationIntrospectorPair (NO_ANNOTATIONS , NO_ANNOTATIONS )
455
+ .hasAnyGetter (null ));
456
+ assertEquals (Boolean .TRUE , new AnnotationIntrospectorPair (intr1 , NO_ANNOTATIONS )
457
+ .hasAnyGetter (null ));
458
+ assertEquals (Boolean .TRUE , new AnnotationIntrospectorPair (NO_ANNOTATIONS , intr1 )
459
+ .hasAnyGetter (null ));
460
+ assertEquals (Boolean .FALSE , new AnnotationIntrospectorPair (intr2 , NO_ANNOTATIONS )
461
+ .hasAnyGetter (null ));
462
+ assertEquals (Boolean .FALSE , new AnnotationIntrospectorPair (NO_ANNOTATIONS , intr2 )
463
+ .hasAnyGetter (null ));
464
+
465
+ assertEquals (Boolean .TRUE , new AnnotationIntrospectorPair (intr1 , intr2 )
466
+ .hasAnyGetter (null ));
467
+ assertEquals (Boolean .FALSE , new AnnotationIntrospectorPair (intr2 , intr1 )
468
+ .hasAnyGetter (null ));
469
+ }
470
+
425
471
/*
426
472
/**********************************************************
427
473
/* Test methods, deser
0 commit comments