@Test public void null_configuration_throws_not_acceptable_with_message() { expected.expect(PDSNotAcceptableException.class); expected.expectMessage("may not be null"); validatorToTest.assertPDSConfigurationValid(null); }
public void assertPDSConfigurationValid(PDSJobConfiguration configuration) { String message = createValidationErrorMessage(configuration); if (message == null) { return; } LOG.warn("pds job configuration not valid - message:{}", message); throw new PDSNotAcceptableException("Configuration invalid:" + message); }
PDSJobConfigurationValidator { public void assertPDSConfigurationValid(PDSJobConfiguration configuration) { String message = createValidationErrorMessage(configuration); if (message == null) { return; } LOG.warn("pds job configuration not valid - message:{}", message); throw new PDSNotAcceptableException("Configuration invalid:" + message); } }
PDSJobConfigurationValidator { public void assertPDSConfigurationValid(PDSJobConfiguration configuration) { String message = createValidationErrorMessage(configuration); if (message == null) { return; } LOG.warn("pds job configuration not valid - message:{}", message); throw new PDSNotAcceptableException("Configuration invalid:" + message); }  }
PDSJobConfigurationValidator { public void assertPDSConfigurationValid(PDSJobConfiguration configuration) { String message = createValidationErrorMessage(configuration); if (message == null) { return; } LOG.warn("pds job configuration not valid - message:{}", message); throw new PDSNotAcceptableException("Configuration invalid:" + message); }  void assertPDSConfigurationValid(PDSJobConfiguration configuration); }
PDSJobConfigurationValidator { public void assertPDSConfigurationValid(PDSJobConfiguration configuration) { String message = createValidationErrorMessage(configuration); if (message == null) { return; } LOG.warn("pds job configuration not valid - message:{}", message); throw new PDSNotAcceptableException("Configuration invalid:" + message); }  void assertPDSConfigurationValid(PDSJobConfiguration configuration);  }