@Override
    public boolean match(Message msg, StreamRule rule) {
        final boolean inverted = rule.getInverted();
        final Object field = msg.getField(rule.getField());

        if (field != null) {
            final String value = field.toString();
            return inverted ^ value.contains(rule.getValue());
        } else {
            return inverted;
        }
    }
@Test
    public void testNullFieldShouldNotMatch() {
        final String fieldName = "nullfield";
        rule.setField(fieldName);

        msg.addField(fieldName, null);

        final StreamRuleMatcher matcher = getMatcher(rule);
        assertFalse(matcher.match(msg, rule));
    }