test_class.declarator: outputStream
test_class.modifier: private static
test_class.original_string: private static OutputStream outputStream;
test_class.type: OutputStream
test_class.var_name: outputStream
test_class.declarator: response
test_class.modifier: private static
test_class.original_string: private static HttpServletResponseImpl response;
test_class.type: HttpServletResponseImpl
test_class.var_name: response
test_class.file: http/src/test/java/ro/polak/http/errorhandler/AbstractHtmlErrorHandlerTest.java
test_class.identifier: AbstractHtmlErrorHandlerTest
test_case.body: @Test
      public void shouldServeBuiltinDocument() throws Exception {
          AbstractHtmlErrorHandler handler
                  = new SampleHtmlErrorHanlder("500", "MSG_TOKEN", "EXPLANATION_TOKEN", null);
          handler.serve(response);
  
          assertThat(response.getStatus(), containsString("500"));
          assertThat(outputStream.toString(), containsString("MSG_TOKEN"));
          assertThat(outputStream.toString(), containsString("EXPLANATION_TOKEN"));
      }
test_case.class_method_signature: AbstractHtmlErrorHandlerTest.shouldServeBuiltinDocument()
test_case.full_signature: @Test public void shouldServeBuiltinDocument()
test_case.identifier: shouldServeBuiltinDocument
test_case.invocations: serve assertThat getStatus containsString assertThat toString containsString assertThat toString containsString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldServeBuiltinDocument()
focal_class.declarator: errorDocumentPath
focal_class.modifier: private final
focal_class.original_string: private final String errorDocumentPath;
focal_class.type: String
focal_class.var_name: errorDocumentPath
focal_class.declarator: explanation
focal_class.modifier: private
focal_class.original_string: private String explanation;
focal_class.type: String
focal_class.var_name: explanation
focal_class.file: http/src/main/java/ro/polak/http/errorhandler/AbstractHtmlErrorHandler.java
focal_class.identifier: AbstractHtmlErrorHandler
focal_class.class_method_signature: AbstractHtmlErrorHandler.AbstractHtmlErrorHandler(final String status,
                                      final String message,
                                      final String explanation,
                                      final String errorDocumentPath)
focal_class.full_signature: public  AbstractHtmlErrorHandler(final String status,
                                      final String message,
                                      final String explanation,
                                      final String errorDocumentPath)
focal_class.identifier: AbstractHtmlErrorHandler
focal_class.modifiers: public
focal_class.parameters: (final String status,
                                      final String message,
                                      final String explanation,
                                      final String errorDocumentPath)
focal_class.signature:  AbstractHtmlErrorHandler(final String status,
                                      final String message,
                                      final String explanation,
                                      final String errorDocumentPath)
focal_class.class_method_signature: AbstractHtmlErrorHandler.setExplanation(final String explanation)
focal_class.full_signature: protected void setExplanation(final String explanation)
focal_class.identifier: setExplanation
focal_class.modifiers: protected
focal_class.parameters: (final String explanation)
focal_class.return: void
focal_class.signature: void setExplanation(final String explanation)
focal_class.class_method_signature: AbstractHtmlErrorHandler.serve(final HttpServletResponse response)
focal_class.full_signature: @Override public void serve(final HttpServletResponse response)
focal_class.identifier: serve
focal_class.modifiers: @Override public
focal_class.parameters: (final HttpServletResponse response)
focal_class.return: void
focal_class.signature: void serve(final HttpServletResponse response)
focal_class.class_method_signature: AbstractHtmlErrorHandler.serveDocument(final HttpServletResponse response)
focal_class.full_signature: private void serveDocument(final HttpServletResponse response)
focal_class.identifier: serveDocument
focal_class.modifiers: private
focal_class.parameters: (final HttpServletResponse response)
focal_class.return: void
focal_class.signature: void serveDocument(final HttpServletResponse response)
focal_class.class_method_signature: AbstractHtmlErrorHandler.serveFile(final HttpServletResponse response, final File file)
focal_class.full_signature: private void serveFile(final HttpServletResponse response, final File file)
focal_class.identifier: serveFile
focal_class.modifiers: private
focal_class.parameters: (final HttpServletResponse response, final File file)
focal_class.return: void
focal_class.signature: void serveFile(final HttpServletResponse response, final File file)
focal_class.superclass: extends AbstractPlainTextHttpErrorHandler
focal_method.body: @Override
      public void serve(final HttpServletResponse response) throws IOException {
          response.setStatus(getStatus());
          response.setContentType("text/html");
  
          if (StringUtilities.isEmpty(errorDocumentPath)) {
              serveDocument(response);
          } else {
              File file = new File(errorDocumentPath);
              if (file.exists()) {
                  serveFile(response, file);
              } else {
                  throw new IOException(getStatus() + " occurred, specified error handler ("
                          + errorDocumentPath + ") was not found.");
              }
          }
      }
focal_method.class_method_signature: AbstractHtmlErrorHandler.serve(final HttpServletResponse response)
focal_method.full_signature: @Override public void serve(final HttpServletResponse response)
focal_method.identifier: serve
focal_method.invocations: setStatus getStatus setContentType isEmpty serveDocument exists serveFile getStatus
focal_method.modifiers: @Override public
focal_method.parameters: (final HttpServletResponse response)
focal_method.return: void
focal_method.signature: void serve(final HttpServletResponse response)