### Question:
ExecNioSource extends EventSource.Base { public static SourceBuilder buildStream() { return new SourceBuilder() { @Override public EventSource build(String... argv) { Preconditions.checkArgument(argv.length == 1, "execStream(\"cmdline \")"); String command = argv[0]; boolean aggregate = false; boolean restart = false; int period = 0; return new ExecNioSource(command, aggregate, restart, period); } }; } ExecNioSource(String command, boolean aggregate, boolean restart, int period); void close(); Event next(); void open(); static SourceBuilder buildPeriodic(); static SourceBuilder buildStream(); static SourceBuilder builder(); static final String A_PROC_SOURCE; static final String A_EXEC_CMD; }### Answer:
@Test public void testStreamBuilder() throws IOException, FlumeSpecException { ExecNioSource e = (ExecNioSource) ExecNioSource.buildStream().build( "ps -aux"); assertEquals(e.inAggregateMode, false); assertEquals(e.command, "ps -aux"); assertEquals(e.restart, false); assertEquals(e.period, 0); }