Code example for Set

Methods: iterator, size

0
 
		Set<ConstraintViolation<Car>> violations = validator.validateProperty(
				new Car(), 
				"licensePlate" 
		); 
		assertEquals( 1, violations.size() );
		assertEquals( "null is not supported", violations.iterator().next().getMessage() );
	} 
 
	@Test 
	public void usingAggregateResourceBundleLocator() { 
		Validator validator = Validation.byDefaultProvider()
				.configure() 
				.messageInterpolator( 
						new ResourceBundleMessageInterpolator( 
								new AggregateResourceBundleLocator( 
										Arrays.asList(
												"MyMessages", 
												"MyOtherMessages" 
										) 
								)