@Override
    public boolean match(Message msg, StreamRule rule) {
       if(msg.getField(Message.FIELD_GL2_SOURCE_INPUT) == null) {
           return rule.getInverted();
       }
        final String value = msg.getField(Message.FIELD_GL2_SOURCE_INPUT).toString();
        return rule.getInverted() ^ value.trim().equalsIgnoreCase(rule.getValue());
    }
@Test
    public void testSuccessfulMatch() {
        StreamRule rule = getSampleRule();
        rule.setValue("input-id-beef");

        Message msg = getSampleMessage();
        msg.addField(Message.FIELD_GL2_SOURCE_INPUT, "input-id-beef");

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