@Test
public void createsConnectionForDeviceThatNeedsInvocationCounterWithInvocationCounterInitialized()
        throws Exception {

    final DlmsDevice device = new DlmsDeviceBuilder().withHls5Active(true).withInvocationCounter(123L).build();
    final DlmsMessageListener listener = new InvocationCountingDlmsMessageListener();
    final DlmsConnectionManager connectionManager = mock(DlmsConnectionManager.class);
    when(this.connectionFactory.getConnection(device, listener)).thenReturn(connectionManager);
    final DlmsConnectionManager result = this.helper.createConnectionForDevice(device, listener);
    assertThat(result).isSameAs(connectionManager);
    verifyNoMoreInteractions(this.invocationCounterManager);
}