Refactored redundant code in #test_1_add_rule_good.