@Test public void shouldReturnOctetStreamWhenContentTypeIsNull() { ContentType expected = ContentType.createContentType("application/octet-stream"); Part part = new FilePart("name", file, null ); assertThat(part.getContentType() , is(expected)); }
@Override public ContentType getContentType() { return contentType; }
FilePart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } }
FilePart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } FilePart(File file);  FilePart(String name, File file);  FilePart(String name, File file, ContentType contentType); }
FilePart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } FilePart(File file);  FilePart(String name, File file);  FilePart(String name, File file, ContentType contentType); @Override ContentType getContentType(); @Override InputStream getContent(); String getFilename(); }
FilePart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } FilePart(File file);  FilePart(String name, File file);  FilePart(String name, File file, ContentType contentType); @Override ContentType getContentType(); @Override InputStream getContent(); String getFilename();  }