code: void setExtensionsState(Map<String, Boolean> extensionsState) {
          if (extensionsState == null) {
              throw new IllegalArgumentException("Parameter extensionsState must not be null.");
          }
  
          ((HierarchicalConfiguration) getConfig()).clearTree(ALL_EXTENSIONS_KEY);
          int enabledCount = 0;
          for (Iterator<Map.Entry<String, Boolean>> it = extensionsState.entrySet().iterator(); it.hasNext();) {
              Map.Entry<String, Boolean> entry = it.next();
              if (entry.getKey() == null || entry.getValue() == null) {
                  continue;
              }
  
              // Don't persist if enabled, extensions are enabled by default.
              if (!entry.getValue()) {
                  String elementBaseKey = ALL_EXTENSIONS_KEY + "(" + enabledCount + ").";
                  getConfig().setProperty(elementBaseKey + EXTENSION_NAME_KEY, entry.getKey());
                  getConfig().setProperty(elementBaseKey + EXTENSION_ENABLED_KEY, Boolean.FALSE);
  
                  enabledCount++;
              }
          }
          this.extensionsState = Collections.unmodifiableMap(extensionsState);
      }
docs: Sets the extensions' state, to be saved in the configuration file.
  
  @param extensionsState the extensions' state