Improve unittests for ExtraOpts feature