added tests for various kinds of function invocations.