@Override
    public void setVariable(String name, Object value) {
        if (variables.containsKey(name)) {
            setVariableLocally(name, value);
        } else {
            if (parent != null) {
                parent.setVariable(name, value);
            } else {
                setVariableLocally(name, value);
            }
        }
    }
@Test
    public void testSetVariable() {
        ProcessContextImpl context = new ProcessContextImpl();
        context.setVariable("key", "value");
        context.setVariable("key", "value1");
        Assertions.assertEquals("value1", context.getVariable("key"));
        context.removeVariable("key");
        ProcessContextImpl parentContext = new ProcessContextImpl();
        parentContext.setVariable("key", "value");
        context.setParent(parentContext);
        Assertions.assertEquals("value", context.getVariable("key"));
    }