Added test for generating method