@Test public void testNoResultExceptionMapper() { NoResultExceptionMapper mapper = new NoResultExceptionMapper(); Response response = mapper.toResponse(exception); assertNotNull(response); assertEquals(NOT_FOUND, response.getStatus()); }
@Override public Response toResponse(NoResultException e) { return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build(); }
NoResultExceptionMapper implements ExceptionMapper<NoResultException> { @Override public Response toResponse(NoResultException e) { return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build(); } }
NoResultExceptionMapper implements ExceptionMapper<NoResultException> { @Override public Response toResponse(NoResultException e) { return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build(); }  }
NoResultExceptionMapper implements ExceptionMapper<NoResultException> { @Override public Response toResponse(NoResultException e) { return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build(); }  @Override Response toResponse(NoResultException e); }
NoResultExceptionMapper implements ExceptionMapper<NoResultException> { @Override public Response toResponse(NoResultException e) { return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build(); }  @Override Response toResponse(NoResultException e);  }