/**
  * @param string $reservationCode
  * @return \Illuminate\Http\JsonResponse
  */
 public function delete($reservationCode)
 {
     $reservation = $this->service->read($reservationCode);
     if (empty($reservation)) {
         return $this->responseNotFound();
     }
     $this->service->cancel($reservation, $this->getUser());
     return $this->responseOk();
 }
 /**
  * @test
  */
 public function cancel()
 {
     $reservation = Reservation::find(1);
     $user = User::find(2);
     $this->sut->cancel($reservation, $user);
     $this->assertFalse(Reservation::where('id', 1)->exists(1));
     $actual = Book::find(2);
     $this->assertSame(4, $actual->inventory);
 }