@Test
    public void generate_notification_rules() {
        Rule rule1 = new SimpleSpELRule()
                .name("some rule")
                .when("#{ ['notification'].payload.apiOrgId == 'ApiOrg'}");

        Rule rule2 = new SimpleSpELRule()
                .name("another rule")
                .when("#{ ['notification'].payload.clientOrgId == 'MobileKompany'}");

        Rule rule3 = new SimpleSpELRule()
                .name("another rule")
                .when("#{ ['notification'].payload.clientOrgId == 'XXX'}");

    ActivationRuleGroup ruleGroup = new ActivationRuleGroup();
       ruleGroup.addRule(rule3);
       ruleGroup.addRule(rule2);
       ruleGroup.addRule(rule1);

        Rules rules = new Rules();
        rules.register(ruleGroup);

        Facts facts = new Facts();
        facts.add(new Fact<>("notification", notification));

        RulesEngineParameters parameters = new RulesEngineParameters()
                .skipOnFirstFailedRule(false)
                .skipOnFirstAppliedRule(false)
                .skipOnFirstNonTriggeredRule(false);

        RulesEngine rulesEngine = new DefaultRulesEngine(parameters);
        rulesEngine.fire(rules, facts);

        Assert.assertTrue(ruleGroup.evaluate(facts));
    }
@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/test/java/io/apiman/manager/api/notifications/NotificationRulesServiceTest.java