Added tests for new generate functionality.