@Test public void when_a_server_configuration_does_not_contain_product_id_an_exception_is_thrown() { expected.expect(PDSNotAcceptableException.class); expected.expectMessage("does not support product identifier"); PDSJobConfiguration config = prepareValidConfig(); config.setProductId("productid-notknown-by-server"); validatorToTest.assertPDSConfigurationValid(config); }
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);  }