Add a gen_test implementation