### Question:
JaxRsExceptionInterceptor { public Response convertExceptionIntoResponse(final JaxRsRequest theRequest, final JaxRsResponseException theException) throws IOException { return handleExceptionWithoutServletError(theRequest, theException); } JaxRsExceptionInterceptor();   JaxRsExceptionInterceptor(final ExceptionHandlingInterceptor exceptionHandler); @AroundInvoke Object intercept(final InvocationContext ctx); JaxRsResponseException convertException(final AbstractJaxRsProvider theServer, final Throwable theException); Response convertExceptionIntoResponse(final JaxRsRequest theRequest, final JaxRsResponseException theException);  }### Answer:
@Test public void testHandleExceptionWithServletError() throws Throwable { JaxRsRequest request = ((AbstractJaxRsProvider) context.getTarget()).getRequest(null, null).build(); ExceptionHandlingInterceptor exceptionHandler = spy(ExceptionHandlingInterceptor.class); interceptor = new JaxRsExceptionInterceptor(exceptionHandler); when(context.proceed()).thenThrow(new ServletException()); JaxRsResponseException thrownException = new JaxRsResponseException(new NotImplementedOperationException("not implemented")); doThrow(new javax.servlet.ServletException("someMessage")).when(exceptionHandler).handleException(request, thrownException); Response result = interceptor.convertExceptionIntoResponse(request, thrownException); assertEquals(InternalErrorException.STATUS_CODE, result.getStatus()); }