### Question:
PathUtilsImpl implements PathUtils { public String buildPath(boolean prependSlash, String... pathElements) { StringBuilder result = new StringBuilder("/"); for (String pathElement : pathElements) { result.append(pathElement).append("/"); } String retVal = result.toString().replace(" if (retVal.endsWith("/")) { retVal = retVal.substring(0, retVal.length() - 1); } return retVal; }  String buildPath(boolean prependSlash, String... pathElements); String getFileFromPath(String path);  }### Answer:
@Test public void testBuildPath() { String result = classUnderTest.buildPath(true, new String[] { "a", "path", "to", "a", "file" }); assertEquals("/a/path/to/a/file", result); }