@Test
public void testSubstitutions() {

    Properties p = new Properties();
    p.setProperty("test.name", "Ben");
    p.setProperty("test.message1", "Hello ${test.name}");
    p.setProperty("test.message2", "${test.name} says hello");
    p.setProperty("test.message3", "Teh ${test.name} iz ${test.name} here");
    p.setProperty("test.message4",
            "${test.name} has a ${test.name} in his ${test.name}, ${test.name}");
    p.setProperty("test.nosub", "$Rev: 1234$");
    p.setProperty("test.message5", "this var is ${irreplaceable}!");
    Settings settings = new Settings();
    settings.substituteVariables(p);
    Assert.assertEquals("Hello Ben", p.getProperty("test.message1"));
    Assert.assertEquals("Ben says hello", p.getProperty("test.message2"));
    Assert.assertEquals("Teh Ben iz Ben here", p.getProperty("test.message3"));
    Assert.assertEquals("Ben has a Ben in his Ben, Ben", p.getProperty("test.message4"));
    Assert.assertEquals("this var is ${irreplaceable}!", p.getProperty("test.message5"));
}