ResolvePath { public static String replaceVars(String line) { StringBuffer sb = new StringBuffer(); Matcher m = pattern.matcher(line); while (m.find()) { String code = m.group(1); m.appendReplacement(sb, resolveCode(code)); } m.appendTail(sb); return sb.toString(); } private  ResolvePath(); static String replaceVars(String line);  }
@Test public void testReplaceVars() throws BDREException { String input = "t=%t a=%a A=%A b=%b B=%B c=%c d=%d e=%e D=%D H=%H I=%I j=%j k=%k m=%m n=%n M=%M p=%p s=%s S=%S y=%y Y=%Y z=%z"; LOGGER.debug("input="+input); String output = ResolvePath.replaceVars(input); LOGGER.debug("output="+output); assert !output.contains("Unknown"); }