### Question:
HelpBuildUtils { public static Path locateReference(Path sourceFile, String ref) throws URISyntaxException { URI resolved = resolve(sourceFile, ref); if (isRemote(resolved)) { return null; } Path refPath = createPathFromURI(sourceFile, resolved); return refPath; } private  HelpBuildUtils(); static HelpModuleLocation toLocation(File file); static Path getRoot(Collection<Path> roots, Path file); static Path getHelpTopicDir(Path file); static Path getFile(Path srcFile, String relativePath); static Path relativizeWithHelpTopics(Path p); static Path relativize(Path parent, Path child); static void cleanupHelpFileLinks(Path helpFile); static void debug(String text); static Path toDefaultFS(Path path); static Path toFS(Path targetFS, Path path); static Path createReferencePath(URI fileURI); static boolean isRemote(String uriString); static boolean isRemote(Path path); static boolean isRemote(URI uri); static ImageLocation locateImageReference(Path sourceFile, String ref); static Path locateReference(Path sourceFile, String ref); static boolean debug; }### Answer:
@Test public void testLocateReference_Local_HelpSystemSyntax() throws URISyntaxException { Path sourceFile = Paths.get(HTML_FILE_PATH); String reference = "help/topics/shared/foo.png"; Path resolved = HelpBuildUtils.locateReference(sourceFile, reference); assertEquals("Help System syntax was not preserved", Paths.get(reference), resolved); }
@Test public void testLocateReference_Local_RelativeSyntax() throws URISyntaxException { Path sourceFile = Paths.get(HTML_FILE_PATH); String reference = "../shared/foo.png"; Path resolved = HelpBuildUtils.locateReference(sourceFile, reference); assertEquals("Relative syntax did not locate file", Paths.get(HELP_TOPIC_PATH + "/shared/foo.png"), resolved); }