* Test for special case of overloaded method execute
*/
public void testExecute_AmbiguousOverloadedMethods() throws Exception {
MockObject mo = new MockObject();
Object[] arguments = new Object[] { new MockObject(), new MockObject() };
Statement t = new Statement(mo, "overloadedMethod", arguments);
t.execute();
MockObject.assertCalled("overloadedmethod", arguments);
arguments = new Object[] { new MockParent(), new MockParent() };
t = new Statement(mo, "overloadedMethod", arguments);
t.execute();
MockObject.assertCalled("overloadedmethod2", arguments);
arguments = new Object[] { new MockObject(), new MockObject() };
t = new Statement(mo, "overloadedMethodB", arguments);
try{
t.execute();
fail("should throw Exception");
}catch(Exception e){
}
arguments = new Object[] { new MockObject(), new MockParent() };
t = new Statement(mo, "overloadedMethodB", arguments);
t.execute();
MockObject.assertCalled("overloadedmethodB", arguments);
}