public async Task Given_A_Request_For_A_List_Then_Return_Success() { //Arrange var handlerResponse = new List.Result(new List <List.Result.Property>() { new List.Result.Property() { AddressLine1 = "First Line of Address", Postcode = "AB12 4CD" } }); mediatorMock.Setup(x => x.Send(It.IsAny <List.Query>(), default(CancellationToken))).Returns(Task.FromResult(handlerResponse)); //Act var sut = new PropertyController(mediatorMock.Object); var actionResult = await sut.List(new List.Query()) as OkObjectResult; //Assert Assert.NotNull(actionResult); Assert.Equal(actionResult.StatusCode, (Int32)System.Net.HttpStatusCode.OK); }