@Override
  public synchronized List<HeliumPackage> getAll() throws IOException {
    List<HeliumPackage> result = new LinkedList<>();

    File file = new File(uri());
    File [] files = file.listFiles();
    if (files == null) {
      return result;
    }

    for (File f : files) {
      if (f.getName().startsWith(".")) {
        continue;
      }

      HeliumPackage pkgInfo = readPackageInfo(f);
      if (pkgInfo != null) {
        result.add(pkgInfo);
      }
    }
    return result;
  }
@Test
  void testGetAllPackage() throws IOException {
    // given
    File r1Path = new File(tmpDir, "r1");
    HeliumLocalRegistry r1 = new HeliumLocalRegistry("r1", r1Path.getAbsolutePath());
    assertEquals(0, r1.getAll().size());

    // when
    Gson gson = new Gson();
    HeliumPackage pkg1 = newHeliumPackage(HeliumType.APPLICATION,
        "app1",
        "desc1",
        "artifact1",
        "classname1",
        new String[][]{},
        "license",
        "");
    FileUtils.writeStringToFile(new File(r1Path, "pkg1.json"), gson.toJson(pkg1),
        StandardCharsets.UTF_8);

    // then
    assertEquals(1, r1.getAll().size());
  }