String wrongUriWithSpace = "http://SERVER/0/F8C57293124EDBF9C125783200376835/$FILE/EXXO-ADDM-2011-000020-01 (p2).doc";
DefaultURICleanerImpl uriCleaner = new DefaultURICleanerImpl();
uriCleaner.setSearchList(new String [] { " " });
uriCleaner.setReplacementList(new String [] { "%20" });
String cleanedUri = uriCleaner.clean(wrongUriWithSpace);
assertEquals("http://SERVER/0/F8C57293124EDBF9C125783200376835/$FILE/EXXO-ADDM-2011-000020-01%20(p2).doc", cleanedUri);
wrongUriWithSpace = "http://SERVER/0/F8C57293124EDBF9C125783200376835/$FILE/EXXO-ADDM-2011-000020-01 (p2)^^^.doc";
uriCleaner.setSearchList(new String [] { " ", "^" });
uriCleaner.setReplacementList(new String [] { "%20", "%5E" });