@Test public void getConfigurationObjectIOException() throws Exception { when(this.dlmsConnection.get(any(AttributeAddress.class))).thenThrow(new IOException()); assertThatExceptionOfType(ConnectionException.class).isThrownBy(() -> { this.instance.getConfigurationObject(this.conn); }); }
public ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn) throws ProtocolAdapterException { final AttributeAddress attributeAddress = AttributeAddressFactory.getConfigurationObjectAddress(); conn.getDlmsMessageListener().setDescription( String.format("Retrieve current ConfigurationObject, attribute: %s", JdlmsObjectToStringUtil.describeAttributes(attributeAddress))); return this.getConfigurationObject(this.getGetResult(conn, attributeAddress)); }
GetConfigurationObjectService implements ProtocolService { public ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn) throws ProtocolAdapterException { final AttributeAddress attributeAddress = AttributeAddressFactory.getConfigurationObjectAddress(); conn.getDlmsMessageListener().setDescription( String.format("Retrieve current ConfigurationObject, attribute: %s", JdlmsObjectToStringUtil.describeAttributes(attributeAddress))); return this.getConfigurationObject(this.getGetResult(conn, attributeAddress)); } }
GetConfigurationObjectService implements ProtocolService { public ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn) throws ProtocolAdapterException { final AttributeAddress attributeAddress = AttributeAddressFactory.getConfigurationObjectAddress(); conn.getDlmsMessageListener().setDescription( String.format("Retrieve current ConfigurationObject, attribute: %s", JdlmsObjectToStringUtil.describeAttributes(attributeAddress))); return this.getConfigurationObject(this.getGetResult(conn, attributeAddress)); }  }
GetConfigurationObjectService implements ProtocolService { public ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn) throws ProtocolAdapterException { final AttributeAddress attributeAddress = AttributeAddressFactory.getConfigurationObjectAddress(); conn.getDlmsMessageListener().setDescription( String.format("Retrieve current ConfigurationObject, attribute: %s", JdlmsObjectToStringUtil.describeAttributes(attributeAddress))); return this.getConfigurationObject(this.getGetResult(conn, attributeAddress)); }  ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn); }
GetConfigurationObjectService implements ProtocolService { public ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn) throws ProtocolAdapterException { final AttributeAddress attributeAddress = AttributeAddressFactory.getConfigurationObjectAddress(); conn.getDlmsMessageListener().setDescription( String.format("Retrieve current ConfigurationObject, attribute: %s", JdlmsObjectToStringUtil.describeAttributes(attributeAddress))); return this.getConfigurationObject(this.getGetResult(conn, attributeAddress)); }  ConfigurationObjectDto getConfigurationObject(final DlmsConnectionManager conn);  }