@Override
	public boolean match(Message msg, StreamRule rule) {
        if (msg.getField(rule.getField()) == null) {
            return rule.getInverted();
        }

		final String value = msg.getField(rule.getField()).toString();

		return rule.getInverted() ^ value.trim().equals(rule.getValue());
	}
@Test
    public void testSuccessfulMatch() {
        StreamRule rule = getSampleRule();

        Message msg = getSampleMessage();
        msg.addField("something", "foo");

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