unit_test for generate extended