@Test
    public void testLabeledAlarm() throws IllegalExpressionException {
        ValueColumnMetadata.INSTANCE.putIfAbsent(
            "endpoint_labeled", "testColumn", Column.ValueDataType.LABELED_VALUE, 0, Scope.Endpoint.getScopeId());
        AlarmRule alarmRule = new AlarmRule(null);
        alarmRule.setExpression("sum(endpoint_labeled{p='95,99'} > 10) >= 3");
        alarmRule.getIncludeMetrics().add("endpoint_labeled");
        assertLabeled(alarmRule, "{p=50},17|{p=99},11", "{p=75},15|{p=95},12|{p=99},12", "{p=90},1|{p=99},20", 1);
        alarmRule.setExpression("sum(endpoint_labeled > 10) >= 3");
        assertLabeled(alarmRule, "{p=50},17|{p=99},11", "{p=75},15|{p=95},12|{p=99},12", "{p=90},1|{p=99},20", 1);
        alarmRule.setExpression("sum(endpoint_labeled{_='50'} > 10) >= 3");
        assertLabeled(alarmRule, "{p=50},17|{p=99},11", "{p=75},15|{p=95},12|{p=99},12", "{p=90},1|{p=99},20", 0);
    }
Running rule is the core of how does alarm work.
<p>
So in this test, we need to simulate a lot of scenario to see the reactions.
oap-server/server-alarm-plugin/src/test/java/org/apache/skywalking/oap/server/core/alarm/provider/RunningRuleTest.java