Buggy code:
public class CommonsMultipartResolverTests { @ Test public void withApplicationContext ( ) throws Exception { } @ Test public void withApplicationContextAndLazyResolution ( ) throws Exception { } private void doTestWithApplicationContext ( boolean lazy ) throws Exception { } private void doTestParameters ( MultipartHttpServletRequest request ) { } private void doTestFiles ( MultipartHttpServletRequest request ) throws IOException { } private void doTestBinding ( CommonsMultipartResolverTests . MockCommonsMultipartResolver resolver , MockHttpServletRequest originalRequest , MultipartHttpServletRequest request ) throws UnsupportedEncodingException { } @ Test public void withServletContextAndFilter ( ) throws Exception { } @ Test public void withServletContextAndFilterWithCustomBeanName ( ) throws Exception { } public static class MockCommonsMultipartResolver extends CommonsMultipartResolver { private boolean empty ; protected void setEmpty ( boolean empty ) { } @ Override protected FileUpload newFileUpload ( FileItemFactory fileItemFactory ) { return new ServletFileUpload ( ) { @ Override public List parseRequest ( HttpServletRequest request ) { if ( request instanceof MultipartHttpServletRequest ) { throw new IllegalStateException ( "Already<seq2seq4repair_space>a<seq2seq4repair_space>multipart<seq2seq4repair_space>request" ) ; } List < FileItem > fileItems = new ArrayList < FileItem > ( ) ; CommonsMultipartResolverTests . MockFileItem fileItem1 = new CommonsMultipartResolverTests . MockFileItem ( "field1" , "type1" , ( empty ? "" : "field1.txt" ) , ( empty ? "" : "text1" ) ) ; CommonsMultipartResolverTests . MockFileItem fileItem1x = new CommonsMultipartResolverTests . MockFileItem ( "field1" , "type1" , ( empty ? "" : "field1.txt" ) , ( empty ? "" : "text1" ) ) ; CommonsMultipartResolverTests . MockFileItem fileItem2 = new CommonsMultipartResolverTests . MockFileItem ( "field2" , "type2" , ( empty ? "" : "C://field2.txt" ) , ( empty ? "" : "text2" ) ) ; CommonsMultipartResolverTests . MockFileItem fileItem2x = new CommonsMultipartResolverTests . MockFileItem ( "field2x" , "type2" , ( empty ? "" : "C:\\field2x.txt" ) , ( empty ? "" : "text2" ) ) ; CommonsMultipartResolverTests . MockFileItem fileItem3 = new CommonsMultipartResolverTests . MockFileItem ( "field3" , null , null , "value3" ) ; <START_BUG> CommonsMultipartResolverTests . MockFileItem fileItem4 = new CommonsMultipartResolverTests . MockFileItem ( "field4" , null , null , "value4" ) ; <END_BUG> CommonsMultipartResolverTests . MockFileItem fileItem5 = new CommonsMultipartResolverTests . MockFileItem ( "field4" , null , null , "value5" ) ; fileItems . add ( fileItem1 ) ; fileItems . add ( fileItem1x ) ; fileItems . add ( fileItem2 ) ; fileItems . add ( fileItem2x ) ; fileItems . add ( fileItem3 ) ; fileItems . add ( fileItem4 ) ; fileItems . add ( fileItem5 ) ; return fileItems ; } } ; } } private static class MockFileItem implements FileItem { private String fieldName ; private String contentType ; private String name ; private String value ; private File writtenFile ; private boolean deleted ; public MockFileItem ( String fieldName , String contentType , String name , String value ) { } public InputStream getInputStream ( ) throws IOException { } public String getContentType ( ) { } public String getName ( ) { } public boolean isInMemory ( ) { } public long getSize ( ) { } public byte [ ] get ( ) { } public String getString ( String encoding ) throws UnsupportedEncodingException { } public String getString ( ) { } public void write ( File file ) throws Exception { } public File getWrittenFile ( ) { } public void delete ( ) { } public boolean isDeleted ( ) { } public String getFieldName ( ) { } public void setFieldName ( String s ) { } public boolean isFormField ( ) { } public void setFormField ( boolean b ) { } public OutputStream getOutputStream ( ) throws IOException { } } public class MultipartTestBean1 { private MultipartFile field1 ; private byte [ ] field2 ; public void setField1 ( MultipartFile field1 ) { } public MultipartFile getField1 ( ) { } public void setField2 ( byte [ ] field2 ) { } public byte [ ] getField2 ( ) { } } public class MultipartTestBean2 { private String field1 ; private String field2 ; public void setField1 ( String field1 ) { } public String getField1 ( ) { } public void setField2 ( String field2 ) { } public String getField2 ( ) { } } }

Fix:
CommonsMultipartResolverTests . MockFileItem fileItem4 = new CommonsMultipartResolverTests . MockFileItem ( "field4" , "text//html;<seq2seq4repair_space>charset=iso-8859-1" , null , "value4" ) ;