public void GetStudentById_ReturnsNotFoundMessage() { //Arrange StudentServiceMock.Setup(x => x.Get(15)).Returns(Fakes.Students().FirstOrDefault(x => x.Id == 15)); var controller = new StudentController(StudentServiceMock.Object, CollegeRulesMock.Object, StudentPathProviderMock.Object) { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }; //Act var result = controller.Get(15); //Assert Assert.IsTrue(result.StatusCode == HttpStatusCode.NotFound); }