New test InvocationTest
More invocation improvements and fixes