public async Task Given_A_Request_To_Update_An_Individual_Property_When_THePropertyDoesNotExist_Then_ReturnNotFound() { //Arrange string propertyReference = "P009"; mediatorMock.Setup(x => x.Send(It.IsAny <Update.Command>(), default(CancellationToken))).Returns(Task.FromResult <Update.Result>(null)); //Act var sut = new PropertyController(mediatorMock.Object); var actionResult = await sut.PartialPropertyUpdate(propertyReference, new JsonPatchDocument <PropertyPatchModel>()) as NotFoundResult; //Assert Assert.NotNull(actionResult); Assert.Equal(actionResult.StatusCode, (Int32)System.Net.HttpStatusCode.NotFound); }