test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule public
test_class.original_string: @Rule public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.declarator: requestPath = "/a/b/c"
test_class.modifier: private final
test_class.original_string: private final String requestPath = "/a/b/c";
test_class.type: String
test_class.var_name: requestPath
test_class.declarator: request
test_class.modifier: private
test_class.original_string: private ContainerRequest   request;
test_class.type: ContainerRequest
test_class.var_name: request
test_class.declarator: response
test_class.modifier: private
test_class.original_string: private ContainerResponse  response;
test_class.type: ContainerResponse
test_class.var_name: response
test_class.declarator: requestDispatcher
test_class.modifier: private
test_class.original_string: private RequestDispatcher  requestDispatcher;
test_class.type: RequestDispatcher
test_class.var_name: requestDispatcher
test_class.declarator: providers
test_class.modifier: private
test_class.original_string: private ProviderBinder     providers;
test_class.type: ProviderBinder
test_class.var_name: providers
test_class.declarator: environmentContext
test_class.modifier: private
test_class.original_string: private EnvironmentContext environmentContext;
test_class.type: EnvironmentContext
test_class.var_name: environmentContext
test_class.declarator: requestHandler
test_class.modifier: private
test_class.original_string: private RequestHandlerImpl requestHandler;
test_class.type: RequestHandlerImpl
test_class.var_name: requestHandler
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/RequestHandlerImplTest.java
test_class.identifier: RequestHandlerImplTest
test_case.body: @Test
      public void usesExceptionMapperToConvertWebApplicationExceptionToResponseWhenResponseFromWebApplicationExceptionDoesNotHaveEntity() throws Exception {
          WebApplicationException webApplicationException = new WebApplicationException(serverError().build());
          doThrow(webApplicationException).when(requestDispatcher).dispatch(request, response);
          ExceptionMapper<WebApplicationException> exceptionMapper = mock(ExceptionMapper.class);
          when(exceptionMapper.toResponse(webApplicationException)).thenReturn(serverError().entity("response from exception mapper").build());
          when(providers.getExceptionMapper(WebApplicationException.class)).thenReturn(exceptionMapper);
  
          requestHandler.handleRequest(request, response);
  
          ArgumentCaptor<Response> argumentCaptor = ArgumentCaptor.forClass(Response.class);
          verify(response).setResponse(argumentCaptor.capture());
          assertEquals(INTERNAL_SERVER_ERROR, argumentCaptor.getValue().getStatusInfo());
          assertEquals("response from exception mapper", argumentCaptor.getValue().getEntity());
      }
test_case.class_method_signature: RequestHandlerImplTest.usesExceptionMapperToConvertWebApplicationExceptionToResponseWhenResponseFromWebApplicationExceptionDoesNotHaveEntity()
test_case.full_signature: @Test public void usesExceptionMapperToConvertWebApplicationExceptionToResponseWhenResponseFromWebApplicationExceptionDoesNotHaveEntity()
test_case.identifier: usesExceptionMapperToConvertWebApplicationExceptionToResponseWhenResponseFromWebApplicationExceptionDoesNotHaveEntity
test_case.invocations: build serverError dispatch when doThrow mock thenReturn when toResponse build entity serverError thenReturn when getExceptionMapper handleRequest forClass setResponse verify capture assertEquals getStatusInfo getValue assertEquals getEntity getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void usesExceptionMapperToConvertWebApplicationExceptionToResponseWhenResponseFromWebApplicationExceptionDoesNotHaveEntity()
focal_class.declarator: LOG = LoggerFactory.getLogger(RequestHandlerImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(RequestHandlerImpl.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: dispatcher
focal_class.modifier: private final
focal_class.original_string: private final RequestDispatcher dispatcher;
focal_class.type: RequestDispatcher
focal_class.var_name: dispatcher
focal_class.declarator: providers
focal_class.modifier: private final
focal_class.original_string: private final ProviderBinder providers;
focal_class.type: ProviderBinder
focal_class.var_name: providers
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/RequestHandlerImpl.java
focal_class.identifier: RequestHandlerImpl
focal_class.interfaces: implements RequestHandler
focal_class.class_method_signature: RequestHandlerImpl.RequestHandlerImpl(RequestDispatcher dispatcher, ProviderBinder providers)
focal_class.full_signature: public  RequestHandlerImpl(RequestDispatcher dispatcher, ProviderBinder providers)
focal_class.identifier: RequestHandlerImpl
focal_class.modifiers: public
focal_class.parameters: (RequestDispatcher dispatcher, ProviderBinder providers)
focal_class.signature:  RequestHandlerImpl(RequestDispatcher dispatcher, ProviderBinder providers)
focal_class.class_method_signature: RequestHandlerImpl.handleRequest(GenericContainerRequest request, GenericContainerResponse response)
focal_class.full_signature: @Override public void handleRequest(GenericContainerRequest request, GenericContainerResponse response)
focal_class.identifier: handleRequest
focal_class.modifiers: @Override public
focal_class.parameters: (GenericContainerRequest request, GenericContainerResponse response)
focal_class.return: void
focal_class.signature: void handleRequest(GenericContainerRequest request, GenericContainerResponse response)
focal_class.class_method_signature: RequestHandlerImpl.handleWebApplicationException(WebApplicationException webApplicationException, GenericContainerResponse response)
focal_class.full_signature: @SuppressWarnings({"unchecked"}) private void handleWebApplicationException(WebApplicationException webApplicationException, GenericContainerResponse response)
focal_class.identifier: handleWebApplicationException
focal_class.modifiers: @SuppressWarnings({"unchecked"}) private
focal_class.parameters: (WebApplicationException webApplicationException, GenericContainerResponse response)
focal_class.return: void
focal_class.signature: void handleWebApplicationException(WebApplicationException webApplicationException, GenericContainerResponse response)
focal_class.class_method_signature: RequestHandlerImpl.handleInternalException(InternalException internalException, GenericContainerResponse response)
focal_class.full_signature: @SuppressWarnings({"unchecked"}) private void handleInternalException(InternalException internalException, GenericContainerResponse response)
focal_class.identifier: handleInternalException
focal_class.modifiers: @SuppressWarnings({"unchecked"}) private
focal_class.parameters: (InternalException internalException, GenericContainerResponse response)
focal_class.return: void
focal_class.signature: void handleInternalException(InternalException internalException, GenericContainerResponse response)
focal_class.class_method_signature: RequestHandlerImpl.propagateErrorIfHaveErrorPage(Throwable error, ErrorPages errorPages)
focal_class.full_signature: private void propagateErrorIfHaveErrorPage(Throwable error, ErrorPages errorPages)
focal_class.identifier: propagateErrorIfHaveErrorPage
focal_class.modifiers: private
focal_class.parameters: (Throwable error, ErrorPages errorPages)
focal_class.return: void
focal_class.signature: void propagateErrorIfHaveErrorPage(Throwable error, ErrorPages errorPages)
focal_class.class_method_signature: RequestHandlerImpl.propagateErrorIfHaveErrorPage(int errorStatus, ErrorPages errorPages)
focal_class.full_signature: private void propagateErrorIfHaveErrorPage(int errorStatus, ErrorPages errorPages)
focal_class.identifier: propagateErrorIfHaveErrorPage
focal_class.modifiers: private
focal_class.parameters: (int errorStatus, ErrorPages errorPages)
focal_class.return: void
focal_class.signature: void propagateErrorIfHaveErrorPage(int errorStatus, ErrorPages errorPages)
focal_class.class_method_signature: RequestHandlerImpl.setupInternalResponseHeaders(int status, MultivaluedMap<String, Object> responseHeaders)
focal_class.full_signature: @Deprecated private void setupInternalResponseHeaders(int status, MultivaluedMap<String, Object> responseHeaders)
focal_class.identifier: setupInternalResponseHeaders
focal_class.modifiers: @Deprecated private
focal_class.parameters: (int status, MultivaluedMap<String, Object> responseHeaders)
focal_class.return: void
focal_class.signature: void setupInternalResponseHeaders(int status, MultivaluedMap<String, Object> responseHeaders)
focal_class.class_method_signature: RequestHandlerImpl.getProviders()
focal_class.full_signature: @Override public ProviderBinder getProviders()
focal_class.identifier: getProviders
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ProviderBinder
focal_class.signature: ProviderBinder getProviders()
focal_class.class_method_signature: RequestHandlerImpl.getResources()
focal_class.full_signature: @Override public ResourceBinder getResources()
focal_class.identifier: getResources
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ResourceBinder
focal_class.signature: ResourceBinder getResources()
focal_class.class_method_signature: RequestHandlerImpl.createErrorResponse(int status, String message)
focal_class.full_signature: private Response createErrorResponse(int status, String message)
focal_class.identifier: createErrorResponse
focal_class.modifiers: private
focal_class.parameters: (int status, String message)
focal_class.return: Response
focal_class.signature: Response createErrorResponse(int status, String message)
focal_class.class_method_signature: RequestHandlerImpl.getJaxrsHeader(int status)
focal_class.full_signature: private String getJaxrsHeader(int status)
focal_class.identifier: getJaxrsHeader
focal_class.modifiers: private
focal_class.parameters: (int status)
focal_class.return: String
focal_class.signature: String getJaxrsHeader(int status)
focal_method.body: @Override
      public void handleRequest(GenericContainerRequest request, GenericContainerResponse response) throws IOException {
          final ApplicationContext context = ApplicationContext.getCurrent();
  
          try {
              for (RequestFilter filter : providers.getRequestFilters(context.getPath())) {
                  filter.doFilter(request);
              }
              dispatcher.dispatch(request, response);
              setupInternalResponseHeaders(response.getStatus(), response.getHttpHeaders());
              for (ResponseFilter filter : providers.getResponseFilters(context.getPath())) {
                  filter.doFilter(response);
              }
          } catch (Exception e) {
              if (e instanceof WebApplicationException) {
                  handleWebApplicationException((WebApplicationException)e, response);
              } else if (e instanceof InternalException) {
                  handleInternalException((InternalException)e, response);
              } else {
                  throw new UnhandledException(e);
              }
          }
  
          response.writeResponse();
      }
focal_method.class_method_signature: RequestHandlerImpl.handleRequest(GenericContainerRequest request, GenericContainerResponse response)
focal_method.full_signature: @Override public void handleRequest(GenericContainerRequest request, GenericContainerResponse response)
focal_method.identifier: handleRequest
focal_method.invocations: getCurrent getRequestFilters getPath doFilter dispatch setupInternalResponseHeaders getStatus getHttpHeaders getResponseFilters getPath doFilter handleWebApplicationException handleInternalException writeResponse
focal_method.modifiers: @Override public
focal_method.parameters: (GenericContainerRequest request, GenericContainerResponse response)
focal_method.return: void
focal_method.signature: void handleRequest(GenericContainerRequest request, GenericContainerResponse response)