### Question:
MultipartHttpEntity implements HttpEntity { @Override public InputStream getInputStream() { InputStream result = new ByteArrayInputStream(new byte[0]); for (HttpEntityPart part : parts) { result = new SequenceInputStream(result, part.getInputStream(boundary)); } return new SequenceInputStream(result, new ByteArrayInputStream(getEpilogue())); } private  MultipartHttpEntity(Builder builder); @Override long length(); @Override InputStream getInputStream(); @Override String getContentType();  }### Answer:
@Test public void test_HttpEntityPart_content() { MultipartHttpEntity.HttpEntityPart entityPart = new MultipartHttpEntity.HttpEntityPart( new StringHttpEntity("foo", "text/plain"), "text", null); String entityString = streamToString(entityPart.getInputStream(BOUNDARY)); String[] lines = entityString.split("\r\n"); assertEquals("must contain 6 lines separated with CRLF", 6, lines.length); assertEquals("line 0 must be empty", "", lines[0]); assertEquals("line 1 must contain --boundary", "--" + BOUNDARY, lines[1]); assertEquals("line 2 must contain Content-Disposition", "Content-Disposition: form-data; name=\"text\"", lines[2]); assertEquals("line 3 must contain Content-Type", "Content-Type: text/plain", lines[3]); assertEquals("line 4 must be empty", "", lines[4]); assertEquals("line 5 must be entity content", "foo", lines[5]); }