### Question:
CollectorSource extends EventSource.Base { public static SourceBuilder builder() { return new SourceBuilder() { @Override public EventSource build(String... argv) { Preconditions.checkArgument(argv.length <= 1, "usage: collectorSource[(port={" + FlumeConfiguration.COLLECTOR_EVENT_PORT + "})]"); int port = FlumeConfiguration.get().getCollectorPort(); if (argv.length >= 1) port = Integer.parseInt(argv[0]); return new CollectorSource(port); } }; } CollectorSource(int port); @Override void close(); @Override void open(); @Override Event next(); @Override void getReports(String namePrefix, Map<String, ReportEvent> reports); int getPort(); static SourceBuilder builder();  }### Answer:
@Test public void testBuilder() throws FlumeSpecException { String src = "collectorSource"; FlumeBuilder.buildSource(src); String src2 = "collectorSource(5150)"; FlumeBuilder.buildSource(src2); try { FlumeBuilder.buildSource("collectorSource(99, \"red luftballoons\")"); } catch (Exception e) { return; } fail("should have caught aproblem"); }