### Question:
MultipartPart implements Closeable { protected void visitCustomHeaders(PartVisitor visitor) { if (isNonEmpty(part.getCustomHeaders())) { for (Param param : part.getCustomHeaders()) { visitor.withBytes(CRLF_BYTES); visitor.withBytes(param.getName().getBytes(US_ASCII)); visitor.withBytes(HEADER_NAME_VALUE_SEPARATOR_BYTES); visitor.withBytes(param.getValue().getBytes(US_ASCII)); } } } MultipartPart(T part, byte[] boundary); long length(); MultipartState getState(); boolean isTargetSlow(); long transferTo(ByteBuf target); long transferTo(WritableByteChannel target); @Override void close();  }### Answer:
@Test public void testVisitCustomHeaders() { TestFileLikePart fileLikePart = new TestFileLikePart(null); fileLikePart.addCustomHeader("custom-header", "header-value"); try (TestMultipartPart multipartPart = new TestMultipartPart(fileLikePart, new byte[0])) { CounterPartVisitor counterVisitor = new CounterPartVisitor(); multipartPart.visitCustomHeaders(counterVisitor); assertEquals(counterVisitor.getCount(), 29, "CounterPartVisitor count for visitCustomHeaders should include the length of the custom headers"); } }
@Test public void testVisitCustomHeadersWhenNoCustomHeaders() { TestFileLikePart fileLikePart = new TestFileLikePart(null); try (TestMultipartPart multipartPart = new TestMultipartPart(fileLikePart, new byte[0])) { CounterPartVisitor counterVisitor = new CounterPartVisitor(); multipartPart.visitCustomHeaders(counterVisitor); assertEquals(counterVisitor.getCount(), 0, "CounterPartVisitor count for visitCustomHeaders should be zero for visitCustomHeaders " + "when there are no custom headers"); } }