@Test
public void testStop() throws Exception {

	CustomValidationConfiguration validationSpec = new CustomValidationConfiguration();
	validationSpec.setStopSeverity(Severity.Info);
	validationSpec.setRejectSeverity(Severity.Warning);
	
	MessageValidatorConfiguration validator = new MessageValidatorConfiguration();
	validator.setId("stoppingValidator");
	validator.setFactory(ValidatorMock.Factory.class.getName());
	validator.addSetting(ValidatorMock.SEVERITY, Severity.Info);        
	validationSpec.addValidator(validator);
	validator = new MessageValidatorConfiguration();
	validator.setId("notExecutedValidator");
	validator.setFactory(ValidatorMock.Factory.class.getName());
	validator.addSetting(ValidatorMock.SEVERITY, Severity.Warning);        
	validationSpec.addValidator(validator);
	
	ValidationResult result = new DefaultValidationExecutor().validate(new UserMessage(), validationSpec);
	
	assertFalse(result.executedAllValidators());
	assertFalse(result.shouldRejectMessage());
	assertFalse(Utils.isNullOrEmpty(result.getValidationErrors()));
	assertNotNull(result.getValidationErrors().get("stoppingValidator"));
	assertNull(result.getValidationErrors().get("notExecutedValidator"));    	
}