Fix posthook in test case to take instance as first argument