public void replace(String name, String token, String value) {
        name = name.trim();
        Variable v = vars.get(name);
        if (v == null) {
            throw new RuntimeException("no variable found with name: " + name);
        }
        String text = v.getAsString();
        String replaced = replacePlaceholderText(text, token, value);
        setVariable(name, replaced);
    }
@Test
    void testReplace() {
        assign("foo", "'hello <world>'");
        engine.replace("foo", "world", "'blah'");
        matchEquals("foo", "'hello blah'");
        assign("str", "'ha <foo> ha'");
        Json json = Json.of("[{token: 'foo', value: \"'bar'\" }]");
        engine.replaceTable("str", json.asList());
        matchEquals("str", "'ha bar ha'");
    }