refactoring for functional ManageRulesTest