@Test
/** morphline says route to southpole if it's an avro file, otherwise route to northpole */
public void testIfDetectMimeTypeRouteToSouthPole() throws Exception {

  Context context = new Context();
  context.put(MorphlineHandlerImpl.MORPHLINE_FILE_PARAM,
              RESOURCES_DIR + "/test-morphlines/ifDetectMimeType.conf");
  context.put(MorphlineHandlerImpl.MORPHLINE_VARIABLE_PARAM + ".MY.MIME_TYPE", "avro/binary");
  Event input = EventBuilder.withBody(Files.toByteArray(
      new File(RESOURCES_DIR + "/test-documents/sample-statuses-20120906-141433.avro")));
  Event actual = build(context).intercept(input);
  Map<String, String> expected = new HashMap();
  expected.put(Fields.ATTACHMENT_MIME_TYPE, "avro/binary");
  expected.put("flume.selector.header", "goToSouthPole");
  Event expectedEvent = EventBuilder.withBody(input.getBody(), expected);
  assertEqualsEvent(expectedEvent, actual);
}