public async Task get_trip_async_should_invoke_repository_method() { var mockedRepository = new Mock <ITripRepository>(); var customerRepository = new Mock <ICustomerRepository>(); var mockedMapper = new Mock <ITraveloMapper>(); mockedRepository.Setup(x => x.GetTripAsync(It.IsAny <Guid>())).ReturnsAsync(DomainTestsHelper.ValidTrip); var mockedDateTimeProvider = new Mock <IDateTimeOffsetProvider>(); var tripService = new TripService(mockedRepository.Object, customerRepository.Object, mockedMapper.Object, mockedDateTimeProvider.Object); await tripService.GetTripAsync(Guid.NewGuid()); mockedRepository.Verify(x => x.GetTripAsync(It.IsAny <Guid>()), Times.Once()); }