test for generate attribute