code: public Set<InstallLicense> getFeatureLicense(String esaLocation, Locale locale) throws InstallException {
          Set<InstallLicense> licenses = new HashSet<InstallLicense>();
          ArrayList<InstallAsset> installAssets = new ArrayList<InstallAsset>();
          getResolveDirector().resolve(esaLocation, "", product.getInstalledFeatures(), installAssets, 10, 40);
          if (installAssets.isEmpty()) {
              return licenses;
          }
  
          Map<String, InstallLicenseImpl> licenseIds = new HashMap<String, InstallLicenseImpl>();
          for (InstallAsset installAsset : installAssets) {
              if (installAsset.isFeature()) {
                  ESAAsset esa = (ESAAsset) installAsset;
                  LicenseProvider lp = esa.getLicenseProvider(locale);
                  String licenseId = esa.getLicenseId();
                  if (licenseId != null && !licenseId.isEmpty()) {
                      InstallLicenseImpl ili = licenseIds.get(licenseId);
                      if (ili == null) {
                          ili = new InstallLicenseImpl(licenseId, null, lp);
                          licenseIds.put(licenseId, ili);
                      }
                      ili.addFeature(esa.getProvideFeature());
                  }
              }
          }
          licenses.addAll(licenseIds.values());
          return licenses;
      }
docs: Gets the licenses for the specified esa location.
  
  @param esaLocation location of esa
  @param locale Locale for the license
  @return A set of InstallLicenses for the features at the esa location
  @throws InstallException