refactoring ManageRulesTest