Added tests for RulesManager