code: public static Config propertiesToConfig(Properties properties, Optional<String> prefix) {
      Set<String> blacklistedKeys = new HashSet<>();
      if (properties.containsKey(GOBBLIN_CONFIG_BLACKLIST_KEYS)) {
        blacklistedKeys = new HashSet<>(Splitter.on(',').omitEmptyStrings().trimResults()
            .splitToList(properties.getProperty(GOBBLIN_CONFIG_BLACKLIST_KEYS)));
      }
  
      Set<String> fullPrefixKeys = findFullPrefixKeys(properties, prefix);
  
      ImmutableMap.Builder<String, Object> immutableMapBuilder = ImmutableMap.builder();
      for (Map.Entry<Object, Object> entry : properties.entrySet()) {
        String entryKey = entry.getKey().toString();
        if (StringUtils.startsWith(entryKey, prefix.or(StringUtils.EMPTY)) &&
            !blacklistedKeys.contains(entryKey)) {
          if (fullPrefixKeys.contains(entryKey)) {
            entryKey = sanitizeFullPrefixKey(entryKey);
          } else if (entryKey.endsWith(STRIP_SUFFIX)) {
            throw new RuntimeException("Properties are not allowed to end in " + STRIP_SUFFIX);
          }
          immutableMapBuilder.put(entryKey, entry.getValue());
        }
      }
      return ConfigFactory.parseMap(immutableMapBuilder.build());
    }
docs: Convert all the keys that start with a <code>prefix</code> in {@link Properties} to a {@link Config} instance.
  
  <p>
  This method will throw an exception if (1) the {@link Object#toString()} method of any two keys in the
  {@link Properties} objects returns the same {@link String}, or (2) if any two keys are prefixes of one another,
  see the Java Docs of {@link ConfigFactory#parseMap(Map)} for more details.
  </p>
  
  @param properties the given {@link Properties} instance
  @param prefix of keys to be converted
  @return a {@link Config} instance