public void EndRentalByScooterId_ScooterRented_UpdatesScooterAndRental()
        {
            var scooter = new Scooter("id", 1)
            {
                IsRented = true
            };
            var rental = new Rental();

            _scooterRepositoryMock.Setup(x => x.GetById("id")).Returns(scooter);
            _rentalRepositoryMock.Setup(x => x.GetLastRentalByScooterId("id")).Returns(rental);

            _rentalService.EndRentalByScooterId("id");

            _rentalRepositoryMock.Verify(x => x.CreateOrUpdate(It.Is <Rental>(y => y.RentalEnd.HasValue)));
            _scooterRepositoryMock.Verify(x => x.CreateOrUpdate(It.Is <Scooter>(y => !y.IsRented)));
        }