code: public static void putConfigurationIntoProperties(Configuration configuration, Properties properties) {
      for (Iterator<Entry<String, String>> it = configuration.iterator(); it.hasNext();) {
        Entry<String, String> entry = it.next();
        properties.put(entry.getKey(), entry.getValue());
      }
    }
docs: Put all configuration properties in a given {@link Configuration} object into a given
  {@link Properties} object.
  
  @param configuration the given {@link Configuration} object
  @param properties the given {@link Properties} object