Multipart implements Collection<Part>, Writable { public String getBoundary() { return boundary; } Multipart();  Multipart(String boundary); @Override void write(OutputStream out); String getContentType(); @Override boolean add(Part part); @Override boolean addAll(Collection<? extends Part> collection); @Override void clear(); @Override boolean contains(Object obj); @Override boolean containsAll(Collection<?> collection); @Override boolean isEmpty(); @Override Iterator<Part> iterator(); @Override boolean remove(Object obj); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override Object[] toArray(); @SuppressWarnings("hiding") @Override Part[] toArray(Part[] array); @Override int size(); String getBoundary();  }
@Test public void shouldReturnDefaultBoundary() { String boundary = multipart.getBoundary(); assertNotNull(boundary); assertTrue(boundary.length() > 0); }
@Test public void shouldReturnBoundary() { String boundary = "myboundary"; multipart = new Multipart(boundary); String result = multipart.getBoundary(); assertThat(result, is(boundary)); }