Set<ConstraintViolation<FrenchAddress>> constraintViolations = validator.validate( address );
assertCorrectNumberOfViolations( constraintViolations, 1 );
ConstraintViolation<FrenchAddress> constraintViolation = constraintViolations.iterator().next();
assertCorrectConstraintTypes( constraintViolations, NotNull.class );
NotNull notNull = ( NotNull ) constraintViolation.getConstraintDescriptor().getAnnotation();
List<Class<?>> groups = Arrays.asList( notNull.groups() );
assertTrue( groups.size() == 2, "There should be two groups" );
assertTrue( groups.contains( Default.class ), "The default group should be in the list." );
assertTrue(
groups.contains( FrenchAddress.FullAddressCheck.class ),
"The FrenchAddress.FullAddressCheck group should be inherited."