@Test(expected=SubstitutionException.class)
public void substituteWithPropertiesMissingKeyThrowsException() throws Exception {

    // create test properties
    Properties props = new Properties();
    props.put("TEST1", "Hello World");
    // key is missing, should throw exception
    String string0 = StringUtil.substituteWithProperties("$ENV{TEST2}", "$ENV{", "}", props);
}