@Override
    public void refreshPackages() {
        FrameworkWiring wiring = felix.adapt(FrameworkWiring.class);
        final CountDownLatch latch = new CountDownLatch(1);
        wiring.refreshBundles(null,
                              event -> {
                                  switch (event.getType()) {
                                      case FrameworkEvent.PACKAGES_REFRESHED:
                                          latch.countDown();
                                          break;
                                      case FrameworkEvent.ERROR:
                                          log.log(Level.SEVERE, "ERROR FrameworkEvent received.", event.getThrowable());
                                          break;
                                  }
                              });
        try {
            long TIMEOUT_SECONDS = 60L;
            if (!latch.await(TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
                log.warning("No PACKAGES_REFRESHED FrameworkEvent received within " + TIMEOUT_SECONDS +
                                    " seconds of calling FrameworkWiring.refreshBundles()");
            }
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }
NOTE: This method is no longer used by the Jdisc container framework, but kept for completeness.
jdisc_core/src/main/java/com/yahoo/jdisc/core/FelixFramework.java