@Test
public void substituteWithEnvironment() throws Exception {

    // grab some common env vars on linux/windows
    String username = System.getenv("USERNAME");
    // FIXME: this test isn't actually reliable perhaps if the value is missing...
    // let's just skip this test if the username is missing
    if (username != null) {
        // simple substitution
        String result = StringUtil.substituteWithEnvironment("Hello $ENV{USERNAME}");
        Assert.assertEquals("Hello " + username, result);
    } else {
        // skip this test...
    }
}