Search in sources :

Example 1 with TicketNotFoundException

use of io.gravitee.rest.api.service.exceptions.TicketNotFoundException in project gravitee-management-rest-api by gravitee-io.

the class PlatformTicketsResourceTest method shouldNotFindTicket.

@Test
public void shouldNotFindTicket() {
    when(ticketService.findById(any(String.class))).thenThrow(new TicketNotFoundException("id"));
    Response ticket = envTarget(TICKET).request().get();
    assertEquals(NOT_FOUND_404, ticket.getStatus());
}
Also used : Response(javax.ws.rs.core.Response) TicketNotFoundException(io.gravitee.rest.api.service.exceptions.TicketNotFoundException) Test(org.junit.Test)

Aggregations

TicketNotFoundException (io.gravitee.rest.api.service.exceptions.TicketNotFoundException)1 Response (javax.ws.rs.core.Response)1 Test (org.junit.Test)1