@Test
public void areContextVariablesCopied() {

    final Variable value1 = new NodeVariable("var1value");
    final Variable value2 = new NodeVariable("var2value");
    final Set<KeyValuePair<Variable>> variables =
        new HashSet<KeyValuePair<Variable>>();
    variables.add(new KeyValuePair<Variable>("var1name", value1));
    variables.add(new KeyValuePair<Variable>("var2name", value2));
    mockContext.returns(variables.iterator()).iterator();
    adapter.evaluate(mockContext.getMock(), scriptSource);
    mockContext.assertInvoked().iterator();
    adaptee.assertInvoked().put(eq("var1name"), same(value1));
    adaptee.assertInvoked().put(eq("var2name"), same(value2));
}