@Test
public void testGrokIfNotMatchDropEventRetain() throws Exception {

  Context context = new Context();
  context.put(MorphlineHandlerImpl.MORPHLINE_FILE_PARAM,
              RESOURCES_DIR + "/test-morphlines/grokIfNotMatchDropRecord.conf");
  String msg = "<164>Feb  4 10:46:14 syslog sshd[607]: Server listening on 0.0.0.0 port 22.";
  Event input = EventBuilder.withBody(null, ImmutableMap.of(Fields.MESSAGE, msg));
  Event actual = build(context).intercept(input);
  Map<String, String> expected = new HashMap();
  expected.put(Fields.MESSAGE, msg);
  expected.put("syslog_pri", "164");
  expected.put("syslog_timestamp", "Feb  4 10:46:14");
  expected.put("syslog_hostname", "syslog");
  expected.put("syslog_program", "sshd");
  expected.put("syslog_pid", "607");
  expected.put("syslog_message", "Server listening on 0.0.0.0 port 22.");
  Event expectedEvent = EventBuilder.withBody(null, expected);
  assertEqualsEvent(expectedEvent, actual);
}