public void GetById_GoodWeather() { _context.Experiments.Add(new ExperimentEntity() { Name = "MySuccessfulExperiment", Description = "Super hard experiment" }); var res = _controller.GetById(1) as OkNegotiatedContentResult <ExperimentResource>; Assert.IsNotNull(res); Assert.AreEqual("MySuccessfulExperiment", res.Content.Name); }