@Test public void contentTypeIsFileItemContentType() throws Exception { FileItem item = newMock(FileItem.class); UploadedFileItem uploadedFile = new UploadedFileItem(item); expect(item.getContentType()).andReturn("foo"); replay(); assertEquals(uploadedFile.getContentType(), "foo"); verify(); }
@Override public String getContentType() { return item.getContentType(); }
UploadedFileItem implements UploadedFile { @Override public String getContentType() { return item.getContentType(); } }
UploadedFileItem implements UploadedFile { @Override public String getContentType() { return item.getContentType(); } UploadedFileItem(FileItem item); }
UploadedFileItem implements UploadedFile { @Override public String getContentType() { return item.getContentType(); } UploadedFileItem(FileItem item); @Override String getContentType(); @Override String getFileName(); @Override String getFilePath(); @Override long getSize(); @Override InputStream getStream(); @Override boolean isInMemory(); @Override void write(File file); void cleanup(); }
UploadedFileItem implements UploadedFile { @Override public String getContentType() { return item.getContentType(); } UploadedFileItem(FileItem item); @Override String getContentType(); @Override String getFileName(); @Override String getFilePath(); @Override long getSize(); @Override InputStream getStream(); @Override boolean isInMemory(); @Override void write(File file); void cleanup();  }