FileUtils { public static boolean containsControlCharacters( String path ) { return containsControlCharactersPattern.test( path ); }  static String idToPath( String pathId ); static boolean closeQuietly( FileInputStream fileInputStream ); static boolean containsReservedCharacter( String path, char[] reserved ); static boolean containsControlCharacters( String path ); static String[] convertCommaSeparatedStringToArray( String stringToConvert ); static String getParentPath( final String path ); static boolean isRootLevelPath( final String path ); static final String PATH_SEPARATOR; static final String ENCODED_PATH_SEPARATOR; }
@Test public void testContainsControlCharacters() { assertTrue( FileUtils.containsControlCharacters( "/home/Create Control Character \u0017 Folder" ) ); assertFalse( FileUtils.containsControlCharacters( "/home/Create normal Folder" ) ); }