@Override
    public boolean match(Message msg, StreamRule rule) {
        return Optional.ofNullable(rule.getInverted())
                // When this rule is inverted, it should never match
                .map(inverted -> !inverted)
                // If `inverted` is `null`, we always return `true`
                .orElse(true);
    }
@Test
    public void matchAlwaysReturnsFalseIfInverted() throws Exception {
        assertThat(matcher.match(
                message,
                new StreamRuleMock(Map.of("_id", "stream-rule-id", "inverted", true))))
                .isFalse();
    }