code: public static Config getOverriddenConfig(@Nonnull final Config config, @Nullable final AbstractConfiguration ... overrideConfigurations)
      {
          if (overrideConfigurations == null || overrideConfigurations.length == 0) {
              return config;
          }
  
          final CombinedConfiguration cc = new CombinedConfiguration(new OverrideCombiner());
  
          int index  = 0;
          final AbstractConfiguration first = config.config.getNumberOfConfigurations() > 0 ?
              AbstractConfiguration.class.cast(config.config.getConfiguration(index)) // cast always succeeds, internally this returns cd.getConfiguration() which is AbstractConfiguration
              : null;
  
  
          // If the passed in configuration has a system config, add this as the very first one so
          // that system properties override still works.
          if(first != null && first.getClass() == SystemConfiguration.class) {
              cc.addConfiguration(first);
              index++;
          }
          else {
              // Otherwise, if any of the passed in configuration objects is a SystemConfiguration,
              // put that at the very beginning.
              for (AbstractConfiguration c : overrideConfigurations) {
                  if (c.getClass() == SystemConfiguration.class) {
                      cc.addConfiguration(c);
                  }
              }
          }
  
          for (AbstractConfiguration c : overrideConfigurations) {
              if (c.getClass() != SystemConfiguration.class) {
                  cc.addConfiguration(c); // Skip system configuration objects, they have been added earlier.
              }
          }
  
          // Finally, add the existing configuration elements at lowest priority.
          while (index < config.config.getNumberOfConfigurations()) {
              final AbstractConfiguration c = AbstractConfiguration.class.cast(config.config.getConfiguration(index++));
              if (c.getClass() != SystemConfiguration.class) {
                  cc.addConfiguration(c);
              }
          }
  
          return new Config(cc);
      }
docs: Create a new configuration object from an existing object using overrides. If no overrides are passed in, the same object is returned.
  
  the