EventSink counter = fact.getSink(ctx, "counter", "count");
EventSource txtsrc = srcfact.getSource(ctx, "asciisynth", "25", "100");
counter.open();
txtsrc.open();
DirectDriver svrconn = new DirectDriver(rpcSrc, counter);
svrconn.start();
DirectDriver cliconn = new DirectDriver(txtsrc, rpcSink);
cliconn.start();
cliconn.join(Long.MAX_VALUE);
Thread.sleep(250);
svrconn.stop();
rpcSink.close();
rpcSrc.close();
counter.close();
txtsrc.close();
LOG.info("read " + ((CounterSink) counter).getCount() + " lines");
assertEquals(LINES, ((CounterSink) counter).getCount());
assertNull(cliconn.getError());
assertNull(svrconn.getError());
}