Properties custom = new Properties();
custom.setProperty("foo", "bar");
custom.setProperty("emotion", "loves");
final String original = "${user.name} has a ${foo}, and he ${emotion:hates} it, unlike his ${sibling:sister}.";
final String expected = System.getProperty("user.name") + " has a bar, and he loves it, unlike his sister.";
final String actual = Strings.replaceProperties(original, SystemPropertyResolver.INSTANCE, new PropertiesPropertyResolver(custom));
Assert.assertEquals(expected, actual);
}