code: private String replaceProps(String pattern, String path, Properties properties) {
          Matcher matcher = Pattern.compile(pattern).matcher(path);
          String replaced = path;
          while (matcher.find()) {
              replaced = replaced.replace(matcher.group(0), properties.getProperty(matcher.group(1), ""));
          }
          return replaced;
      }
docs: Replace properties in given path using pattern
  @param pattern - pattern to replace. First group should contains property name
  @param path - given path to replace in
  @param properties - list of properties using to replace
  @return path with replaced properties