### Question:
CollectorSink extends EventSink.Base { public static SinkBuilder builder() { return new SinkBuilder() { @Override public EventSink build(Context context, String... argv) { Preconditions.checkArgument(argv.length <= 3 && argv.length >= 2, "usage: collectorSink[(dfsdir,path[,rollmillis])]"); String logdir = FlumeConfiguration.get().getCollectorDfsDir(); long millis = FlumeConfiguration.get().getCollectorRollMillis(); String prefix = ""; if (argv.length >= 1) { logdir = argv[0]; } if (argv.length >= 2) { prefix = argv[1]; } if (argv.length >= 3) { millis = Long.parseLong(argv[2]); } try { EventSink snk = new CollectorSink(logdir, prefix, millis); return snk; } catch (FlumeSpecException e) { LOG.error("CollectorSink spec error " + e, e); throw new IllegalArgumentException( "usage: collectorSink[(dfsdir,path[,rollmillis])]" + e); } } }; } CollectorSink(String path, String filename, long millis);   CollectorSink(String path, String filename, String hiveTableName, long millis);   CollectorSink(String path, String filename, String hiveTableName, long millis, String elasticSearchUrl, String elasticIndex, String elasticType);   CollectorSink(String path, String filename, String hiveTableName, long millis, String elasticSearchUrl, String elasticIndex, String elasticType, boolean runMarkerQueries);   CollectorSink(final String logdir, final String filename, final long millis,
      final Tagger tagger, long checkmillis);   CollectorSink(final String logdir, final String filename, final String hiveTableName, final long millis,
      final Tagger tagger, long checkmillis);   CollectorSink(final String logdir, final String filename, final String hiveTableName, final long millis,
      final Tagger tagger, long checkmillis, final String elasticSearchUrl, final String elasticIndex, final String elasticType);   CollectorSink(final String logdir, final String filename, final String hiveTableName, final long millis,
      final Tagger tagger, long checkmillis, final String elasticSearchUrl, final String elasticIndex, final String elasticType, final boolean runMarkerQueries); @Override void append(Event e); @Override void close(); @Override void open(); @Override String getName(); @Override void getReports(String namePrefix, Map<String, ReportEvent> reports); EventSink getSink(); static SinkBuilder builder(); static SinkBuilder hiveBuilder(); static SinkBuilder hiveElasticSearchBuilder(); static SinkBuilder hesMarkerBuilder();  }### Answer:
@Test public void testBuilder() throws FlumeSpecException { Exception ex = null; try { String src = "collectorSink"; FlumeBuilder.buildSink(new Context(), src); } catch (Exception e) { return; } assertNotNull("No exception thrown!", ex != null); String src2 = "collectorSink(\"file: FlumeBuilder.buildSink(new Context(), src2); String src3 = "collectorSink(\"file: FlumeBuilder.buildSink(new Context(), src3); try { String src4 = "collectorSink(\"file: FlumeBuilder.buildSink(new Context(), src4); } catch (Exception e) { return; } fail("unexpected fall through"); }