public void Test_AddPassenger() { //Arrange var newpassenger = new Passenger() { PassengerId = Convert.ToInt32(DateTime.Now.Ticks.ToString()), FirstName = "Yashvi", LastName = "Patel", PhoneNumber = "1564414465" }; var response = mockDataRepo.Setup(x => x.PassengerRegistration(newpassenger)).Returns(AddPassenger()); //Act var result = _passengerController.PassengerRegistration(newpassenger); //Assert Assert.NotNull(result); }