public void should_return_not_found_404_when_no_result_in_database() { var cursor = StubCursor(); StubNotFoundResult(cursor); _controller.Awaiting(x => x.GetById(Id)) .Should().ThrowExactly <HttpNotFoundException>().And .StatusCode.Should().Be(HttpStatusCode.NotFound); }