add functional test for generate command