test_class.declarator: httpServletResponse
test_class.modifier: private
test_class.original_string: private HttpServletResponse      httpServletResponse;
test_class.type: HttpServletResponse
test_class.var_name: httpServletResponse
test_class.declarator: containerResponse
test_class.modifier: private
test_class.original_string: private GenericContainerResponse containerResponse;
test_class.type: GenericContainerResponse
test_class.var_name: containerResponse
test_class.declarator: servletContainerResponseWriter
test_class.modifier: private
test_class.original_string: private ServletContainerResponseWriter servletContainerResponseWriter;
test_class.type: ServletContainerResponseWriter
test_class.var_name: servletContainerResponseWriter
test_class.file: everrest-core/src/test/java/org/everrest/core/servlet/ServletContainerResponseWriterTest.java
test_class.identifier: ServletContainerResponseWriterTest
test_case.body: @Test
      public void writesBody() throws Exception {
          TstServletOutputStream output = new TstServletOutputStream();
          when(httpServletResponse.getOutputStream()).thenReturn(output);
          when(containerResponse.getEntity()).thenReturn("hello world");
          when(containerResponse.getHttpHeaders()).thenReturn(new MultivaluedHashMap<>());
  
          servletContainerResponseWriter.writeBody(containerResponse, new StringEntityProvider());
  
          assertArrayEquals("hello world".getBytes(), output.getData());
      }
test_case.class_method_signature: ServletContainerResponseWriterTest.writesBody()
test_case.full_signature: @Test public void writesBody()
test_case.identifier: writesBody
test_case.invocations: thenReturn when getOutputStream thenReturn when getEntity thenReturn when getHttpHeaders writeBody assertArrayEquals getBytes getData
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void writesBody()
focal_class.declarator: servletResponse
focal_class.modifier: private final
focal_class.original_string: private final HttpServletResponse servletResponse;
focal_class.type: HttpServletResponse
focal_class.var_name: servletResponse
focal_class.file: everrest-core/src/main/java/org/everrest/core/servlet/ServletContainerResponseWriter.java
focal_class.identifier: ServletContainerResponseWriter
focal_class.interfaces: implements ContainerResponseWriter
focal_class.class_method_signature: ServletContainerResponseWriter.ServletContainerResponseWriter(HttpServletResponse response)
focal_class.full_signature: public  ServletContainerResponseWriter(HttpServletResponse response)
focal_class.identifier: ServletContainerResponseWriter
focal_class.modifiers: public
focal_class.parameters: (HttpServletResponse response)
focal_class.signature:  ServletContainerResponseWriter(HttpServletResponse response)
focal_class.class_method_signature: ServletContainerResponseWriter.writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_class.full_signature: @Override @SuppressWarnings({"unchecked"}) public void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_class.identifier: writeBody
focal_class.modifiers: @Override @SuppressWarnings({"unchecked"}) public
focal_class.parameters: (GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_class.return: void
focal_class.signature: void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_class.class_method_signature: ServletContainerResponseWriter.writeHeaders(GenericContainerResponse response)
focal_class.full_signature: @Override public void writeHeaders(GenericContainerResponse response)
focal_class.identifier: writeHeaders
focal_class.modifiers: @Override public
focal_class.parameters: (GenericContainerResponse response)
focal_class.return: void
focal_class.signature: void writeHeaders(GenericContainerResponse response)
focal_method.body: @Override
      @SuppressWarnings({"unchecked"})
      public void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter) throws IOException {
          if (servletResponse.isCommitted()) {
              return;
          }
          Object entity = response.getEntity();
          if (entity != null) {
              OutputStream out = servletResponse.getOutputStream();
              entityWriter.writeTo(entity, entity.getClass(), response.getEntityType(), null, response.getContentType(),
                                   response.getHttpHeaders(), out);
              out.flush();
          }
      }
focal_method.class_method_signature: ServletContainerResponseWriter.writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_method.full_signature: @Override @SuppressWarnings({"unchecked"}) public void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_method.identifier: writeBody
focal_method.invocations: isCommitted getEntity getOutputStream writeTo getClass getEntityType getContentType getHttpHeaders flush
focal_method.modifiers: @Override @SuppressWarnings({"unchecked"}) public
focal_method.parameters: (GenericContainerResponse response, MessageBodyWriter entityWriter)
focal_method.return: void
focal_method.signature: void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter)