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

  String s = "text(\"filename\", raw)";
  TextFileSink snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof RawOutputFormat);
  s = "text(\"filename\", avrodata)";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof AvroDataFileOutputFormat);
  s = "text(\"filename\", avrojson)";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof AvroJsonOutputFormat);
  s = "text(\"filename\", seqfile)";
  snk = (TextFileSink) FlumeBuilder.buildSink(new Context(), s);
  assertTrue(snk.getFormat() instanceof SequenceFileOutputFormat);
}