### Question:
PathUtilsImpl implements PathUtils { public String getFileFromPath(String path) { if (path.indexOf("/") == -1) { return path; } int slashIndex = path.lastIndexOf("/"); return path.substring(slashIndex+1); }  String buildPath(boolean prependSlash, String... pathElements); String getFileFromPath(String path);  }### Answer:
@Test public void testGetFileFromPath() { String result = classUnderTest.getFileFromPath("/a/path/to/a/file"); assertEquals("file", result); result = classUnderTest.getFileFromPath("file"); assertEquals("file", result); }