Helium { public synchronized void saveConfig() throws IOException { String jsonString; synchronized (registry) { clearNotExistsPackages(); jsonString = heliumConf.toJson(); } File heliumConfFile = new File(heliumConfPath); if (!heliumConfFile.exists()) { heliumConfFile.createNewFile(); } FileUtils.writeStringToFile(heliumConfFile, jsonString); } @Inject  Helium(
      ZeppelinConfiguration conf,
      HeliumBundleFactory heliumBundleFactory,
      HeliumApplicationFactory heliumApplicationFactory,
      InterpreterSettingManager interpreterSettingManager); @VisibleForTesting  Helium(
      String heliumConfPath,
      String registryPaths,
      File registryCacheDir,
      HeliumBundleFactory bundleFactory,
      HeliumApplicationFactory applicationFactory,
      InterpreterSettingManager interpreterSettingManager); void addRegistry(HeliumRegistry registry); void clear(); HeliumApplicationFactory getApplicationFactory(); synchronized void saveConfig(); Map<String, List<HeliumPackageSearchResult>> getAllPackageInfo(); Map<String, List<HeliumPackageSearchResult>> getAllPackageInfo(boolean refresh,
                                                                        String packageName); List<HeliumPackageSearchResult> getAllEnabledPackages(); List<HeliumPackageSearchResult> getSinglePackageInfo(String packageName); File getBundle(HeliumPackage pkg, boolean rebuild); boolean enable(String name, String artifact); boolean disable(String name); void updatePackageConfig(String artifact, Map<String, Object> pkgConfig); Map<String, Map<String, Object>> getAllPackageConfig(); HeliumPackageSuggestion suggestApp(Paragraph paragraph); List<HeliumPackage> getBundlePackagesToBundle(); List<String> getVisualizationPackageOrder(); void setVisualizationPackageOrder(List<String> orderedPackageList); Map<String, Map<String, Object>> getSpellConfig(String packageName); Map<String, Map<String, Object>> getPackageConfig(String pkgName,
                                                           String artifact); ResourceSet getAllResources();  }
@Test public void testSaveLoadConf() throws IOException, URISyntaxException, TaskRunnerException { File heliumConf = new File(tmpDir, "helium.conf"); Helium helium = new Helium(heliumConf.getAbsolutePath(), localRegistryPath.getAbsolutePath(), null, null, null, null); assertFalse(heliumConf.exists()); helium.saveConfig(); assertTrue(heliumConf.exists()); Helium heliumRestored = new Helium( heliumConf.getAbsolutePath(), localRegistryPath.getAbsolutePath(), null, null, null, null); }