@Test
public void isDelegateInvoked() throws Exception {

    final Object adapteeResult = new Object();
    mockContext.returns(new HashSet<KeyValuePair<Variable>>().iterator())
        .iterator();
    adaptee.returns(adapteeResult).eval(same(SCRIPT));
    final Object result = adapter.evaluate(mockContext.getMock(),
            scriptSource);
    mockContext.assertInvoked().iterator();
    adaptee.assertInvoked().eval(same(SCRIPT));
    assertSame("Unexpected script result", adapteeResult, result);
}