MultipartDecoderImpl implements MultipartDecoder, ThreadCleanupListener { protected ServletFileUpload createFileUpload() { ServletFileUpload upload = new ServletFileUpload(fileItemFactory); upload.setSizeMax(maxRequestSize); upload.setFileSizeMax(maxFileSize); return upload; } MultipartDecoderImpl(

            FileItemFactory fileItemFactory,

            @Symbol(UploadSymbols.REQUESTSIZE_MAX)
            long maxRequestSize,

            @Symbol(UploadSymbols.FILESIZE_MAX)
            long maxFileSize,

            @Symbol(SymbolConstants.CHARSET)
            String requestEncoding); @Override UploadedFile getFileUpload(String parameterName); @Override HttpServletRequest decode(HttpServletRequest request); @Override void threadDidCleanup(); @Override FileUploadException getUploadException();  }
@Test public void create_file_upload_gets_configuration_from_symbols() throws Exception { MultipartDecoderImpl decoder = new MultipartDecoderImpl(fileItemFactory, 7777, 6666, CHARSET); replay(); ServletFileUpload servletFileUpload = decoder.createFileUpload(); assertNotNull(servletFileUpload); verify(); assertEquals(servletFileUpload.getFileSizeMax(), 6666); assertEquals(servletFileUpload.getSizeMax(), 7777); }