Add more tests for generates function