public void GetLamp_GivenTrafficLightAndLampID_ReturnsLamp() { var greenLamp = new Lamp(1, LampColor.Green); var trafficLight = new TrafficLight(0, new[] { greenLamp }); Mock.Get(trafficLightRepo).Setup(x => x.GetTrafficLightById(0)).Returns(trafficLight); var actualLamp = trafficLightController.GetLamp(0, 1); Assert.Equal(greenLamp, actualLamp); }