public async Task ThenIShouldReturnTheCorrectCharity() { //Act var result = await _controller.GetCharity(123) as OkNegotiatedContentResult <Charity>; //Assert _mediator.Verify(x => x.SendAsync(It.IsAny <GetCharityByRegistrationNumberQuery>()), Times.Once); Assert.IsNotNull(result); Assert.AreEqual(_response.Charity, result.Content); }