public async void TestGetAllEventsByUserId()
        {
            // Assemble
            var matchEvents = new List <MatchEvent>()
            {
                new MatchEvent(
                    UserId.CreateUserId(42).IfNone(new UserId()),
                    MatchId.CreateMatchId(22).IfNone(new MatchId()),
                    DateTime.Now.AddDays(-1),
                    MatchEventType.Conversion
                    ),
                new MatchEvent(
                    UserId.CreateUserId(42).IfNone(new UserId()),
                    MatchId.CreateMatchId(22).IfNone(new MatchId()),
                    DateTime.Now.AddDays(-1),
                    MatchEventType.Conversion
                    )
            };
            Either <IEnumerable <Error>, List <MatchEvent> > returnValue = Right(matchEvents);

            _matchEventRepository.Setup(m => m.GetAllMatchEventsByUserIdAsync(It.IsAny <UserId>(), It.IsAny <MatchId>())).Returns(Task.FromResult(returnValue));

            // Act
            var result = await _matchEventService.GetAllMatchEventsByUserIdAsync(42, 22);

            // Assert
            _matchEventRepository.Verify(w => w.GetAllMatchEventsByUserIdAsync(It.IsAny <UserId>(), It.IsAny <MatchId>()));
            result.Match(
                Left: (err) => Assert.False(true, "Expected no errors to be returned."),
                Right: (matchEvents) => Assert.Equal(2, matchEvents.Count)
                );
        }
        public async Task <IActionResult> GetAllMatchEventAsync(int userId, int matchId)
        {
            var result = await _matchEventService.GetAllMatchEventsByUserIdAsync(userId, matchId);

            IActionResult returnValue = Ok();

            result.Match(
                Left: (err) => returnValue = BadRequest(),
                Right: (ms) => returnValue = Ok(ms)
                );
            return(returnValue);
        }