@Test
public void fieldsWithSameName() throws Exception {

	interceptor = new CommonsUploadMultipartInterceptor(request, parameters, config, validator, mockCreator);

	final List<FileItem> elements = new ArrayList<FileItem>();
	elements.add(new MockFileItem("myfile0", "foo.txt", "foo".getBytes()));
	elements.add(new MockFileItem("myfile1", "foo.txt", "bar".getBytes()));

	when(request.getContentType()).thenReturn("multipart/form-data");
	when(request.getMethod()).thenReturn("POST");
	when(mockUpload.parseRequest(request)).thenReturn(elements);

	interceptor.intercept(stack, method, instance);

	verify(parameters).setParameter("myfile0", "myfile0");
	verify(parameters).setParameter("myfile1", "myfile1");
	
	verify(request).setAttribute(eq("myfile0"), any(UploadedFile.class));
	verify(request).setAttribute(eq("myfile1"), any(UploadedFile.class));
}