@Test
public void initializesInvocationCounterForDeviceThatNeedsInvocationCounterWithInvocationCounterUninitialized()
        throws Exception {

    final DlmsDevice device = new DlmsDeviceBuilder().withHls5Active(true)
            .withProtocol("SMR")
            .withInvocationCounter(null)
            .build();
    final DlmsMessageListener listener = new InvocationCountingDlmsMessageListener();
    final DlmsConnectionManager connectionManager = mock(DlmsConnectionManager.class);
    when(this.connectionFactory.getConnection(device, listener)).thenReturn(connectionManager);
    this.helper.createConnectionForDevice(device, listener);
    verify(this.invocationCounterManager).initializeInvocationCounter(device);
}