@Test
public void should_allow_possible_argument_types() throws Exception {
validator.validate(
new ReturnsArgumentAt(0),
new InvocationBuilder().method("intArgumentReturningInt").argTypes(int.class).arg(1000).toInvocation()
);
validator.validate(
new ReturnsArgumentAt(0),
new InvocationBuilder().method("toString").argTypes(String.class).arg("whatever").toInvocation()
);
validator.validate(
new ReturnsArgumentAt(2),
new InvocationBuilder().method("varargsObject")
.argTypes(int.class, Object[].class)
.args(1000, "Object", "Object")
.toInvocation()
);
validator.validate(
new ReturnsArgumentAt(1),
new InvocationBuilder().method("threeArgumentMethod")
.argTypes(int.class, Object.class, String.class)
.args(1000, "Object", "String")
.toInvocation()
);
}