@Test
public void testTextKWArg() throws RecognitionException, FlumeSpecException {

  String s = "text(\"filename\", format=raw)";
  TextFileSink snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof RawOutputFormat);
  s = "text(\"filename\", format=avrodata)";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof AvroDataFileOutputFormat);
  s = "text(\"filename\", format=avrojson)";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof AvroJsonOutputFormat);
  s = "text(\"filename\", format=seqfile)";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof SequenceFileOutputFormat);
  // this syntax is unsupported in deprecated outptu format args
  s = "text(\"filename\", format=seqfile(\"bzip2\"))";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof SequenceFileOutputFormat);
}