JsonParseExceptionMapper implements ExceptionMapper<JsonParseException> { @Override public Response toResponse(final JsonParseException e) { return ErrorResponseBuilder .from(e) .build(); }  @Override Response toResponse(final JsonParseException e);  }
@Test public void testToResponse() { JsonParseExceptionMapper mapper = new JsonParseExceptionMapper(); JsonParseException jpe = new JsonParseException("foo", mock(JsonLocation.class)); Response r = mapper.toResponse(jpe); ErrorResponse er = (ErrorResponse) r.getEntity(); assertEquals(Status.BAD_REQUEST.getStatusCode(), r.getStatus()); assertEquals(Status.BAD_REQUEST, er.getHttpStatus()); }