Export generateController and add regression test.