UploadedFileItem implements UploadedFile { @Override public boolean isInMemory() { return item.isInMemory(); } 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();  }
@Test public void inMemoryIsFileItemInMemory() throws Exception { FileItem item = newMock(FileItem.class); UploadedFileItem uploadedFile = new UploadedFileItem(item); expect(item.isInMemory()).andReturn(true); replay(); assertTrue(uploadedFile.isInMemory()); verify(); }