@Test public void should_convert_exception_to_response() throws Exception { String message = "invalid certificate"; PersonalCertificateException personalCertificateException = new PersonalCertificateException(message); Response response = certificateExceptionMapper.toResponse(personalCertificateException); assertThat(response.getStatusInfo()).isEqualTo(UNAUTHORIZED); }
@Override public Response toResponse(PersonalCertificateException exception) { LOGGER.error(exception); return Response.status(Response.Status.UNAUTHORIZED).build(); }
PersonalCertificateExceptionMapper implements ExceptionMapper<PersonalCertificateException> { @Override public Response toResponse(PersonalCertificateException exception) { LOGGER.error(exception); return Response.status(Response.Status.UNAUTHORIZED).build(); } }
PersonalCertificateExceptionMapper implements ExceptionMapper<PersonalCertificateException> { @Override public Response toResponse(PersonalCertificateException exception) { LOGGER.error(exception); return Response.status(Response.Status.UNAUTHORIZED).build(); }  }
PersonalCertificateExceptionMapper implements ExceptionMapper<PersonalCertificateException> { @Override public Response toResponse(PersonalCertificateException exception) { LOGGER.error(exception); return Response.status(Response.Status.UNAUTHORIZED).build(); }  @Override Response toResponse(PersonalCertificateException exception); }
PersonalCertificateExceptionMapper implements ExceptionMapper<PersonalCertificateException> { @Override public Response toResponse(PersonalCertificateException exception) { LOGGER.error(exception); return Response.status(Response.Status.UNAUTHORIZED).build(); }  @Override Response toResponse(PersonalCertificateException exception);  }