public void InitiateEstimationStageCommandHandler_InvalidSessionId_ThrowsNotFoundException()
        {
            // Given
            const string sessionId = "not found surely :)";
            var          handler   = new InitiateEstimationStageCommandHandler(this.Context, this.SessionStatusUpdateDispatcherMock);
            var          request   = new InitiateEstimationStageCommand {
                SessionId = sessionId
            };

            // When
            TestDelegate action = () => handler.Handle(request, CancellationToken.None).GetAwaiter().GetResult();

            // Then
            Assert.That(action, Throws.InstanceOf <NotFoundException>());
        }
        public async Task InitiateEstimationStageCommandHandler_OnStatusChange_UpdatesRetroStageAndInvokesNotification()
        {
            // Given
            var handler = new InitiateEstimationStageCommandHandler(this.Context, this.SessionStatusUpdateDispatcherMock);
            var request = new InitiateEstimationStageCommand {
                SessionId = this.SessionId
            };

            this.SystemClockMock.CurrentTimeOffset.Returns(DateTimeOffset.UnixEpoch);

            // When
            await handler.Handle(request, CancellationToken.None);

            this.RefreshObject();

            // Then
            Assert.That(this.Session.CurrentStage, Is.EqualTo(SessionStage.Estimation));

            await this.SessionStatusUpdateDispatcherMock.Received().DispatchUpdate(Arg.Any <Session>(), CancellationToken.None);
        }