@Test
public void testIterator() throws Exception {

    assertFalse(context.iterator().hasNext());
    context.setLocalVar("z", "zzz");
    context.setLocalVar("x", "will be overwritten");
    context.setLocalVar("x", dummyVar);
    context.setLocalVar("y", dummyVar);
    assertReflectionEquals(Arrays.asList(
            new KeyValuePair<Variable>("x", dummyVar),
            new KeyValuePair<Variable>("y", dummyVar),
            new KeyValuePair<Variable>("z", new NodeVariable("zzz"))),
            IteratorUtils.toList(context.iterator()), ReflectionComparatorMode.LENIENT_ORDER);
}