Added a test for method invocation.