SetConfigurationObjectService implements ProtocolService { public AccessResultCode setConfigurationObject(final DlmsConnectionManager conn, final ConfigurationObjectDto configurationToSet, final ConfigurationObjectDto configurationOnDevice) throws ProtocolAdapterException { final DataObject dataObject = this.buildSetParameterData(configurationToSet, configurationOnDevice); LOGGER.info("ConfigurationObject SetParameter Data : {}", this.dlmsHelper.getDebugInfo(dataObject)); final AttributeAddress attributeAddress = AttributeAddressFactory.getConfigurationObjectAddress(); final SetParameter setParameter = new SetParameter(attributeAddress, dataObject); conn.getDlmsMessageListener().setDescription( "SetConfigurationObject AttributeAddress: " + JdlmsObjectToStringUtil.describeAttributes( attributeAddress)); return this.getAccessResultCode(conn, setParameter); } SetConfigurationObjectService(final DlmsHelper dlmsHelper); AccessResultCode setConfigurationObject(final DlmsConnectionManager conn,
            final ConfigurationObjectDto configurationToSet, final ConfigurationObjectDto configurationOnDevice);  }
@Test public void setConfigurationObjectIOException() throws Exception { when(this.dlmsConnection.set(any(SetParameter.class))).thenThrow(new IOException()); assertThatExceptionOfType(ConnectionException.class).isThrownBy(() -> { this.instance.setConfigurationObject(this.conn, null, null); }); }