@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 testSuccessfulMatchInArray() {
        msg.addField("something", Collections.singleton("foobar"));

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