### Question:
FileUtils { public static String backOneDirectory(String fileIdentifier) { fileIdentifier = StringUtils.removeEnd(fileIdentifier, File.separator); fileIdentifier = fileIdentifier.substring(0, fileIdentifier.lastIndexOf(File.separator)); return StringUtils.removeEnd(fileIdentifier, File.separator); } private  FileUtils(); static String backOneDirectory(String fileIdentifier); static boolean copyRecursively(final File source, final File destination,
      final boolean deleteDestinationOnExit); static String ensureTrailingSeparator(final String path); static String getCanonicalPath(final File file); static String getFileSeparatorAsRegex(); static String getFirstDirectory(String fileIdentifier); static InputStream getInputStream(final Class<?> loadingClass, final String filename); static String getPath(final Class<?> loadingClass, final String relativeFilename); static String getSystemDependentPath(final Collection<String> pathElements); static String getSystemDependentPath(final String... pathElements); static boolean matchesAntPath(final String antPattern, final String canonicalPath); static final String CURRENT_DIRECTORY; }### Answer:
@Test public void testBackOneDirectory() { assertEquals( "foo" + File.separator + "bar", FileUtils.backOneDirectory("foo" + File.separator + "bar" + File.separator + "baz" + File.separator)); }