public async Task Will_keep_pinging(int randomResult)
        {
            ISession session1 = CreateSession();
            ISession session2 = CreateUnresponsiveSession();

            NetworkConfig networkConfig = new NetworkConfig();

            networkConfig.P2PPingInterval = 50;
            TestRandom     testRandom     = new TestRandom((i) => randomResult);
            SessionMonitor sessionMonitor = new SessionMonitor(networkConfig, LimboLogs.Instance);

            sessionMonitor.AddSession(session1);
            sessionMonitor.AddSession(session2);
            sessionMonitor.Start();
            await Task.Delay(300);

            sessionMonitor.Stop();

            await _pingSender.Received().SendPing();

            await _noPong.Received().SendPing();

            Assert.AreEqual(SessionState.Initialized, session1.State);
            Assert.AreEqual(randomResult == 0? SessionState.Disconnected : SessionState.Initialized, session2.State);
        }
        public void Will_unregister_on_disconnect()
        {
            ISession session = CreateSession();

            TestRandom     testRandom     = new TestRandom((i) => 1);
            SessionMonitor sessionMonitor = new SessionMonitor(new NetworkConfig(), LimboLogs.Instance);

            sessionMonitor.AddSession(session);
            session.Disconnect(DisconnectReason.Other, DisconnectType.Remote, "test");
        }