validator.validate(new DoesNothing(), new InvocationBuilder().method("voidMethod").toInvocation());
}
@Test
public void should_allow_correct_type_of_return_value() throws Throwable {
validator.validate(new Returns("one"), new InvocationBuilder().simpleMethod().toInvocation());
validator.validate(new Returns(false), new InvocationBuilder().method("booleanReturningMethod").toInvocation());
validator.validate(new Returns(Boolean.TRUE), new InvocationBuilder().method("booleanObjectReturningMethod").toInvocation());
validator.validate(new Returns(1), new InvocationBuilder().method("integerReturningMethod").toInvocation());
validator.validate(new Returns(1L), new InvocationBuilder().method("longReturningMethod").toInvocation());
validator.validate(new Returns(1L), new InvocationBuilder().method("longObjectReturningMethod").toInvocation());
validator.validate(new Returns(null), new InvocationBuilder().method("objectReturningMethodNoArgs").toInvocation());
validator.validate(new Returns(1), new InvocationBuilder().method("objectReturningMethodNoArgs").toInvocation());
}