test_class.declarator: exceptionMapper
test_class.modifier: private
test_class.original_string: private DefaultExceptionMapper exceptionMapper;
test_class.type: DefaultExceptionMapper
test_class.var_name: exceptionMapper
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/DefaultExceptionMapperTest.java
test_class.identifier: DefaultExceptionMapperTest
test_case.body: @Test
      public void createsResponseWithStatus500AndUsesFullClassNameOfExceptionAsEntity() {
          Exception exception = new Exception();
  
          Response response = exceptionMapper.toResponse(exception);
  
          assertEquals(500, response.getStatus());
          assertEquals(TEXT_PLAIN_TYPE, response.getMediaType());
          assertEquals(exception.getClass().getName(), response.getEntity());
      }
test_case.class_method_signature: DefaultExceptionMapperTest.createsResponseWithStatus500AndUsesFullClassNameOfExceptionAsEntity()
test_case.full_signature: @Test public void createsResponseWithStatus500AndUsesFullClassNameOfExceptionAsEntity()
test_case.identifier: createsResponseWithStatus500AndUsesFullClassNameOfExceptionAsEntity
test_case.invocations: toResponse assertEquals getStatus assertEquals getMediaType assertEquals getName getClass getEntity
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void createsResponseWithStatus500AndUsesFullClassNameOfExceptionAsEntity()
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/DefaultExceptionMapper.java
focal_class.identifier: DefaultExceptionMapper
focal_class.interfaces: implements ExceptionMapper<Exception>
focal_class.class_method_signature: DefaultExceptionMapper.toResponse(Exception exception)
focal_class.full_signature: @Override public Response toResponse(Exception exception)
focal_class.identifier: toResponse
focal_class.modifiers: @Override public
focal_class.parameters: (Exception exception)
focal_class.return: Response
focal_class.signature: Response toResponse(Exception exception)
focal_method.body: @Override
      public Response toResponse(Exception exception) {
          String message = exception.getMessage();
          if (message == null) {
              message = exception.getClass().getName();
          }
          return Response
                  .status(500)
                  .entity(message)
                  .type(MediaType.TEXT_PLAIN)
                  .header(ExtHttpHeaders.JAXRS_BODY_PROVIDED, "Error-Message")
                  .build();
      }
focal_method.class_method_signature: DefaultExceptionMapper.toResponse(Exception exception)
focal_method.full_signature: @Override public Response toResponse(Exception exception)
focal_method.identifier: toResponse
focal_method.invocations: getMessage getName getClass build header type entity status
focal_method.modifiers: @Override public
focal_method.parameters: (Exception exception)
focal_method.return: Response
focal_method.signature: Response toResponse(Exception exception)