Add type-check test for method invocations.