DocSetSupport { public static void copyIconFile(File iconFile, String docsetDir) throws BuilderException { if (null == iconFile) { return; } try { copyFile(iconFile, getFile(getDocsetRoot(docsetDir), ICON_FILE)); logVerbose("Icon file copied"); } catch (IOException e) { throw new BuilderException("Failed to copy icon file to docset", e); } } private  DocSetSupport(); static void createDocSetStructure(String docsetDir); static void copyIconFile(File iconFile, String docsetDir); static void copyFiles(final String sourceDir, String docsetDir); static void copyFiles(final File sourceDir, String docsetDir); static void createPList(String bundleIdentifier, String displayName, String keyword, String indexFile, String docsetDir); static String getDBDir(String docsetDir);  }
@Test public void testCopyIconFile() throws Exception { final String docsetDir = createAndVerifyDocsetStructure("TestDoc"); final File iconFile = getFile(getDocsetRoot(docsetDir), "icon.png"); copyIconFile(null, docsetDir); assertFalse(iconFile.exists()); final File expectedIconFile = getFile("src", "test", "resources", "blank.png"); copyIconFile(expectedIconFile, docsetDir); assertTrue(iconFile.exists()); assertTrue(contentEquals(expectedIconFile, iconFile)); }