public static String substVars(String val, PropertyContainer pc1) throws ScanException {
        return substVars(val, pc1, null);
    }
@Test
    public void testSubstVarsVariableNotClosed() throws ScanException {
        String noSubst = "testing if ${v1 works";

        try {
            @SuppressWarnings("unused")
            String result = OptionHelper.substVars(noSubst, context);
            fail();
        } catch (IllegalArgumentException e) {
            // ok
        }
    }