### Question:
ConfigurationServiceImpl extends AbstractConveyorComponentService implements ConfigurationService { @Override public ConfigurationProperty addConfigurationProperty( final ConfigurationProperty configurationProperty) throws ConveyorExecutionException { if (configurationProperty == null) { throw new IllegalArgumentException("null configurationProperty"); } log.info("addConfigurationProperty(ConfigurationProperty) with: {}", configurationProperty); try { Date theDate = new Date(); if (configurationProperty.getCreatedAt() == null) { configurationProperty.setCreatedAt(theDate); } configurationProperty.setUpdatedAt(theDate); configurationPropertyDAO.saveOrUpdate(configurationProperty); } catch (TransferDAOException e) { log.error("dao error updating configuration", e); throw new ConveyorExecutionException(e); } log.info("configuration property added"); updateCachedConveyorConfigurationProperties(); return configurationProperty; }  @Override boolean isInTearOffMode(); ConfigurationPropertyDAO getConfigurationPropertyDAO(); void setConfigurationPropertyDAO(
			final ConfigurationPropertyDAO configurationPropertyDAO); @Override List<ConfigurationProperty> listConfigurationProperties(); @Override ConfigurationProperty findConfigurationPropertyByKey(
			final String configurationKey); @Override void deleteConfigurationProperty(
			final ConfigurationProperty configurationProperty); @Override ConfigurationProperty addConfigurationProperty(
			final ConfigurationProperty configurationProperty); @Override void updateConfigurationProperty(
			final ConfigurationProperty configurationProperty); @Override Properties exportProperties(); @Override void importProperties(final Properties propertiesToImport); @Override TransferControlBlock buildDefaultTransferControlBlockBasedOnConfiguration(
			final String restartPath,
			final IRODSAccessObjectFactory irodsAccessObjectFactory); @Override synchronized CachedConveyorConfigurationProperties getCachedConveyorConfigurationProperties(); static final String TEAR_OFF_MODE; }### Answer:
@Test public void testAddConfigurationProperty() throws Exception { String testKey = "testAddConfigurationProperty"; String testValue = "testAddConfigurationPropertyValue"; ConfigurationProperty configProperty = new ConfigurationProperty(); configProperty.setPropertyKey(testKey); configProperty.setPropertyValue(testValue); configProperty.setCreatedAt(new Date()); ConfigurationProperty actual = configurationService .addConfigurationProperty(configProperty); Assert.assertNotNull("null configuration property", actual); }
@Test(expected = IllegalArgumentException.class) public void testAddConfigurationPropertyBlankKey() throws Exception { String testKey = ""; String testValue = "testAddConfigurationPropertyValue"; ConfigurationProperty configProperty = new ConfigurationProperty(); configProperty.setPropertyKey(testKey); configProperty.setPropertyValue(testValue); configProperty.setCreatedAt(new Date()); configurationService.addConfigurationProperty(configProperty); }
@Test(expected = IllegalArgumentException.class) public void testAddConfigurationPropertNull() throws Exception { configurationService.addConfigurationProperty(null); }