### Question:
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); @Override void sink(BusData data);  }### Answer:
@Test public void sink() throws Exception { BusDataQueueGroupImpl qg = new BusDataQueueGroupImpl(); BusDataQueue q = new BusDataQueue(); qg.add(q); BusDataQueueGroupSink s = new BusDataQueueGroupSink(qg); s.sink(bus_data()); m_dh.wait_dispatch_clear(); assertNotNull(q.poll()); assertNull(q.poll()); }
@Test(expected = AssertionError.class) public void cannot_sink_null() throws Exception { BusDataQueueGroupImpl qg = new BusDataQueueGroupImpl(); BusDataQueue q = new BusDataQueue(); qg.add(q); BusDataQueueGroupSink s = new BusDataQueueGroupSink(qg); s.sink(null); }