Improve invoke test.