@Test
public void returnsConnectionManagerForHls5Device() throws Exception {

    final DlmsDevice device = new DlmsDeviceBuilder().withHls5Active(true).build();
    final DlmsMessageListener listener = new InvocationCountingDlmsMessageListener();
    when(this.hls5Connector.connect(device, listener)).thenReturn(this.connection);
    final DlmsConnectionManager result = this.factory.getConnection(device, listener);
    final DlmsConnectionManager expected = this.newConnectionManager(device, listener, this.hls5Connector);
    assertThat(result).isEqualToComparingFieldByField(expected);
    assertThat(result.getConnection()).isSameAs(this.connection);
}