@Test public void testReplaceProperties() { Properties properties = new Properties(); properties.put("one", "1"); properties.put("two", "2"); assertEquals("V1", StringPropertyReplacer.replaceProperties("V${one}", properties)); assertEquals("VX", StringPropertyReplacer.replaceProperties("V${void:X}", properties)); assertEquals("V1", StringPropertyReplacer.replaceProperties("V${void,one}", properties)); assertEquals("VX", StringPropertyReplacer.replaceProperties("V${void1,void2:X}", properties)); assertEquals(System.getenv("PATH"), StringPropertyReplacer.replaceProperties("${env.PATH}", properties)); assertEquals(File.separator, StringPropertyReplacer.replaceProperties("${/}")); assertEquals(File.pathSeparator, StringPropertyReplacer.replaceProperties("${:}")); }
public static String replaceProperties(final String string) { return replaceProperties(string, null); }
StringPropertyReplacer { public static String replaceProperties(final String string) { return replaceProperties(string, null); } }
StringPropertyReplacer { public static String replaceProperties(final String string) { return replaceProperties(string, null); }  }
StringPropertyReplacer { public static String replaceProperties(final String string) { return replaceProperties(string, null); }  static String replaceProperties(final String string); static String replaceProperties(final String string, final Properties props); static void replaceProperties(Map<String, String> map, Properties properties); }
StringPropertyReplacer { public static String replaceProperties(final String string) { return replaceProperties(string, null); }  static String replaceProperties(final String string); static String replaceProperties(final String string, final Properties props); static void replaceProperties(Map<String, String> map, Properties properties); static final String NEWLINE; }