class ExtensionInitializer implements ApplicationContextInitializer<AnnotationConfigApplicationContext> {

  @Override
  public void initialize(AnnotationConfigApplicationContext context) {
    Set<String> packageNames = provider.getPackageNames(context.getEnvironment());
    if (packageNames.size() > 0) {
      LOG.info("Adding packageNames '{}' to component scan.", packageNames);
      context.scan(packageNames.toArray(new String[packageNames.size()]));
    }
  }

  public  ExtensionInitializer();
  @VisibleForTesting  ExtensionInitializer(ExtensionPackageProvider provider);

}