/**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Ticket loading failed, ticket not found.
  */
 public function testDeleteTicketByKeyWhenTicketDoesNotExist()
 {
     $this->ticketRepository->expects($this->once())->method('getByTicketKey')->with(new TicketKey('DT', 1))->will($this->returnValue(null));
     $this->ticketService->deleteTicketByKey(self::DUMMY_TICKET_KEY);
 }
 /**
  * Delete Ticket by key
  *
  * @ApiDoc(
  *  description="Delete ticket by key",
  *  uri="/tickets/{key}.{_format}",
  *  method="DELETE",
  *  resource=true,
  *  requirements={
  *      {
  *          "name"="key",
  *          "dataType"="string",
  *          "requirement"="^.*-[0-9]+$",
  *          "description"="Ticket Key"
  *      }
  *  },
  *  statusCodes={
  *      204="Returned when successful",
  *      403="Returned when the user is not authorized to delete ticket",
  *      404="Returned when the ticket is not found"
  *  }
  * )
  *
  * @param string $key
  * @return void
  */
 public function deleteTicketByKey($key)
 {
     parent::deleteTicketByKey($key);
 }