public async Task LongRunningCallback(int timerTicks)
        {
            using (StartVerifiableLog(out var loggerFactory, LogLevel.Warning))
            {
                var callbackCount = 0;

                using var timer = CustomizedPingTimerFactory.CreateCustomizedPingTimer(loggerFactory.CreateLogger(
                                                                                           nameof(BasicStartStopTest)), nameof(BasicStartStopTest),
                                                                                       async() => {
                    Interlocked.Increment(ref callbackCount);
                    // long running task to make timer skip timerTicks callbacks
                    await Task.Delay(BaseTsPlus * timerTicks);
                },
                                                                                       BaseTs, BaseTs);

                timer.Start();
                await Task.Delay(BaseTsPlus * 2 *timerTicks);

                timer.Stop();
                Assert.Equal(2, callbackCount);

                // extra check it really stopped
                await Task.Delay(BaseTsPlus * 2 *timerTicks);

                Assert.Equal(2, callbackCount);
            }
        }
 static ServiceConnectionContainerBase.CustomizedPingTimer CreatePingTimer(ILoggerFactory loggerFactory, Action counter) =>
 CustomizedPingTimerFactory.CreateCustomizedPingTimer(loggerFactory.CreateLogger(
                                                          nameof(BasicStartStopTest)), nameof(BasicStartStopTest),
                                                      () => {
     counter();
     return(Task.CompletedTask);
 },
                                                      BaseTs, BaseTs);