code: Collection<String> getFeaturesToInstall(Collection<String> requiredFeatures, boolean download) {
          Collection<String> featuresToInstall = new ArrayList<String>(requiredFeatures.size());
          if (!requiredFeatures.isEmpty()) {
              Map<String, ProvisioningFeatureDefinition> installedFeatures = product.getFeatureDefinitions();
              for (String feature : requiredFeatures) {
                  if (download || !containFeature(installedFeatures, feature))
                      featuresToInstall.add(feature);
              }
          }
          return featuresToInstall;
      }
docs: Creates a collection of features that still need to be installed
  
  @param requiredFeatures Collection of all features that should be installed
  @param download if all features (including already installed) should be downloaded
  @return The subset of requiredFeatures containing features that still need to be installed