Refactored common tests for boolean options.