Add typedef for TestMethod. Fixes #19.