@Test(expected = InvalidParameterException.class)
public void throwsInvalidParameterExceptionIfIOExceptionOccurs() throws Exception {

	interceptor = new CommonsUploadMultipartInterceptor(request, parameters, config, validator, mockCreator);
		
	MockFileItem item = new MockFileItem("thefile0", "file.txt", new byte[0]);
	item = spy(item);
	
	doThrow(new IOException()).when(item).getInputStream();
	
	when(request.getContentType()).thenReturn("multipart/form-data");
	when(request.getMethod()).thenReturn("POST");
	
	List<FileItem> items = new ArrayList<FileItem>();
	items.add(item);
	
	when(mockUpload.parseRequest(request)).thenReturn(items);
	
	interceptor.intercept(stack, method, instance);
}