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: multipartFormDataWriter
test_class.modifier: private
test_class.original_string: private MultipartFormDataWriter multipartFormDataWriter;
test_class.type: MultipartFormDataWriter
test_class.var_name: multipartFormDataWriter
test_class.declarator: providers
test_class.modifier: private
test_class.original_string: private Providers               providers;
test_class.type: Providers
test_class.var_name: providers
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/multipart/MultipartFormDataWriterTest.java
test_class.identifier: MultipartFormDataWriterTest
test_case.body: @Test
      public void writesItemsOfMultipartContentToOutputStream() throws Exception {
          ByteArrayOutputStream bOut = new ByteArrayOutputStream();
          MessageBodyWriter<String> messageBodyWriter = mockStringMessageBodyWriter(bOut);
          when(providers.getMessageBodyWriter(eq(String.class), any(), any(Annotation[].class), any(MediaType.class))).thenReturn(messageBodyWriter);
  
          OutputItem item1 = anOutputItem().withName("item1").withEntity("item1 entity").withMediaType(TEXT_PLAIN_TYPE).withFilename("item1.txt").build();
          OutputItem item2 = anOutputItem().withName("item2").withEntity("{\"item2\":\"entity\"}").withMediaType(APPLICATION_JSON_TYPE).withFilename("item2.json").build();
          multipartFormDataWriter.writeItems(newArrayList(item1, item2), bOut, "1234567".getBytes());
  
          String expectedContent = "--1234567\r\n" +
                                   "Content-Disposition: form-data; name=\"item1\"; filename=\"item1.txt\"\r\n" +
                                   "Content-Type: text/plain\r\n" +
                                   "\r\n" +
                                   "item1 entity\r\n" +
                                   "--1234567\r\n" +
                                   "Content-Disposition: form-data; name=\"item2\"; filename=\"item2.json\"\r\n" +
                                   "Content-Type: application/json\r\n" +
                                   "\r\n" +
                                   "{\"item2\":\"entity\"}\r\n" +
                                   "--1234567--\r\n";
          assertEquals(expectedContent, bOut.toString());
      }
test_case.class_method_signature: MultipartFormDataWriterTest.writesItemsOfMultipartContentToOutputStream()
test_case.full_signature: @Test public void writesItemsOfMultipartContentToOutputStream()
test_case.identifier: writesItemsOfMultipartContentToOutputStream
test_case.invocations: mockStringMessageBodyWriter thenReturn when getMessageBodyWriter eq any any any build withFilename withMediaType withEntity withName anOutputItem build withFilename withMediaType withEntity withName anOutputItem writeItems newArrayList getBytes assertEquals toString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void writesItemsOfMultipartContentToOutputStream()
focal_class.declarator: EMPTY             = new Annotation[0]
focal_class.modifier: private static final
focal_class.original_string: private static final Annotation[] EMPTY             = new Annotation[0];
focal_class.type: Annotation[]
focal_class.var_name: EMPTY
focal_class.declarator: NEW_LINE          = "\r\n".getBytes()
focal_class.modifier: private static final
focal_class.original_string: private static final byte[]       NEW_LINE          = "\r\n".getBytes();
focal_class.type: byte[]
focal_class.var_name: NEW_LINE
focal_class.declarator: HEADER_LINE_DELIM = ": ".getBytes()
focal_class.modifier: private static final
focal_class.original_string: private static final byte[]       HEADER_LINE_DELIM = ": ".getBytes();
focal_class.type: byte[]
focal_class.var_name: HEADER_LINE_DELIM
focal_class.declarator: HYPHENS           = "--".getBytes()
focal_class.modifier: private static final
focal_class.original_string: private static final byte[]       HYPHENS           = "--".getBytes();
focal_class.type: byte[]
focal_class.var_name: HYPHENS
focal_class.declarator: providers
focal_class.modifier: private
focal_class.original_string: private Providers providers;
focal_class.type: Providers
focal_class.var_name: providers
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/multipart/MultipartFormDataWriter.java
focal_class.identifier: MultipartFormDataWriter
focal_class.class_method_signature: MultipartFormDataWriter.MultipartFormDataWriter(Providers providers)
focal_class.full_signature: public  MultipartFormDataWriter(Providers providers)
focal_class.identifier: MultipartFormDataWriter
focal_class.modifiers: public
focal_class.parameters: (Providers providers)
focal_class.signature:  MultipartFormDataWriter(Providers providers)
focal_class.class_method_signature: MultipartFormDataWriter.writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_class.full_signature: public void writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_class.identifier: writeItems
focal_class.modifiers: public
focal_class.parameters: (Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_class.return: void
focal_class.signature: void writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_class.class_method_signature: MultipartFormDataWriter.writeItem(OutputItem item, OutputStream output, byte[] boundary)
focal_class.full_signature: @SuppressWarnings("unchecked") protected void writeItem(OutputItem item, OutputStream output, byte[] boundary)
focal_class.identifier: writeItem
focal_class.modifiers: @SuppressWarnings("unchecked") protected
focal_class.parameters: (OutputItem item, OutputStream output, byte[] boundary)
focal_class.return: void
focal_class.signature: void writeItem(OutputItem item, OutputStream output, byte[] boundary)
focal_class.class_method_signature: MultipartFormDataWriter.writeHeaders(MultivaluedMap<String, String> headers, OutputStream output)
focal_class.full_signature: private void writeHeaders(MultivaluedMap<String, String> headers, OutputStream output)
focal_class.identifier: writeHeaders
focal_class.modifiers: private
focal_class.parameters: (MultivaluedMap<String, String> headers, OutputStream output)
focal_class.return: void
focal_class.signature: void writeHeaders(MultivaluedMap<String, String> headers, OutputStream output)
focal_method.body: public void writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary) throws IOException {
          for (OutputItem item : items) {
              writeItem(item, output, boundary);
          }
          output.write(HYPHENS);
          output.write(boundary);
          output.write(HYPHENS);
          output.write(NEW_LINE);
      }
focal_method.class_method_signature: MultipartFormDataWriter.writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_method.full_signature: public void writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_method.identifier: writeItems
focal_method.invocations: writeItem write write write write
focal_method.modifiers: public
focal_method.parameters: (Collection<OutputItem> items, OutputStream output, byte[] boundary)
focal_method.return: void
focal_method.signature: void writeItems(Collection<OutputItem> items, OutputStream output, byte[] boundary)