Add test for generate order options
Fixes #5251