@Test
public void test() {

	
	ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
	Validator validator = factory.getValidator();
	
	Vehiculo vCompleteCheck = new Vehiculo();
	Vehiculo vPostCheck = new Vehiculo();
			
	Set<ConstraintViolation<Vehiculo>> vComplete = validator.validate(vCompleteCheck, VehiculoCompleteCheck.class );
	Set<ConstraintViolation<Vehiculo>> vPost = validator.validate(vPostCheck, VehiculosPostCheck.class );
	
	assertEquals("Deberia haber 5 violaciones", 5 , vComplete.size() );
	assertEquals("Deberia haber 4 violaciones", 4 , vPost.size() );
	
	vCompleteCheck.setMatricula("12");
	vComplete = validator.validate(vCompleteCheck, VehiculoCompleteCheck.class );
	assertEquals("quitamos viloacion NotEmpty", 4 , vComplete.size() );
	
	
	vCompleteCheck.setMatricula("12345678");
	vComplete = validator.validate(vCompleteCheck, VehiculoCompleteCheck.class );
	assertEquals("quitamos viloacion Size(min=8, max =10)", 3 , vComplete.size() );
	
	
	
}