ThinArchiveUtils { public static void writeStartupDependencies(final File f, final Set<Dependency> dependencies) throws IOException { Map<String, Set<Dependency>> outputFormat = new HashMap<>(); outputFormat.put("dependencies", filterNullFromDeps(dependencies)); FileUtils.writeStringToFile(f, JSONUtils.toJSON(outputFormat)); }  static File getStartupDependenciesFile(final File projectFolder); static DependencyFile getDependencyFile(final File projectFolder, final Dependency d); static Set<Dependency> parseStartupDependencies(final String rawJson); static Set<Dependency> parseStartupDependencies(final File f); static void writeStartupDependencies(final File f,
      final Set<Dependency> dependencies); static String convertIvyCoordinateToPath(final Dependency dep); static String replaceLocalPathsWithStoragePaths(final File projectFolder,
      String localJarSpec, final Props jobProps, final Logger log); static void validateDependencyHash(final DependencyFile f); static void validateDependencyHash(final File f, final Dependency d); static Set<Dependency> filterNullFromDeps(Set<Dependency> dependencies); static final String DEPENDENCY_STORAGE_ROOT_PATH_PROP; }
@Test public void testWriteStartupDependencies() throws Exception { File outFile = TEMP_DIR.newFile("startup-dependencies.json"); ThinArchiveUtils.writeStartupDependencies(outFile, ThinArchiveTestUtils.getDepSetAB()); String writtenJSON = FileUtils.readFileToString(outFile); JSONAssert.assertEquals(ThinArchiveTestUtils.getRawJSONDepsAB(), writtenJSON, false); }