Add main() test methods to reduce test boilerplate.