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