@Test public void returnsConnectionManagerForLls0Device() throws Exception { final DlmsDevice device = new DlmsDeviceBuilder().withLls1Active(false).build(); final DlmsMessageListener listener = new InvocationCountingDlmsMessageListener(); when(this.lls0Connector.connect(device, listener)).thenReturn(this.connection); final DlmsConnectionManager result = this.factory.getConnection(device, listener); final DlmsConnectionManager expected = this.newConnectionManager(device, listener, this.lls0Connector); assertThat(result).isEqualToComparingFieldByField(expected); assertThat(result.getConnection()).isSameAs(this.connection); }
public DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws OsgpException { return this.newConnectionWithSecurityLevel(device, dlmsMessageListener, SecurityLevel.forDevice(device)); }
DlmsConnectionFactory { public DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws OsgpException { return this.newConnectionWithSecurityLevel(device, dlmsMessageListener, SecurityLevel.forDevice(device)); } }
DlmsConnectionFactory { public DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws OsgpException { return this.newConnectionWithSecurityLevel(device, dlmsMessageListener, SecurityLevel.forDevice(device)); } @Autowired  DlmsConnectionFactory(final Hls5Connector hls5Connector, final Lls1Connector lls1Connector,
            final Lls0Connector lls0Connector, final DomainHelperService domainHelperService); }
DlmsConnectionFactory { public DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws OsgpException { return this.newConnectionWithSecurityLevel(device, dlmsMessageListener, SecurityLevel.forDevice(device)); } @Autowired  DlmsConnectionFactory(final Hls5Connector hls5Connector, final Lls1Connector lls1Connector,
            final Lls0Connector lls0Connector, final DomainHelperService domainHelperService); DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener); DlmsConnectionManager getPublicClientConnection(final DlmsDevice device,
            final DlmsMessageListener dlmsMessageListener); }
DlmsConnectionFactory { public DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws OsgpException { return this.newConnectionWithSecurityLevel(device, dlmsMessageListener, SecurityLevel.forDevice(device)); } @Autowired  DlmsConnectionFactory(final Hls5Connector hls5Connector, final Lls1Connector lls1Connector,
            final Lls0Connector lls0Connector, final DomainHelperService domainHelperService); DlmsConnectionManager getConnection(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener); DlmsConnectionManager getPublicClientConnection(final DlmsDevice device,
            final DlmsMessageListener dlmsMessageListener);  }