### Question:
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); @Override void sink(BusData data);  }### Answer:
@Test public void sink_data_is_written_to_connection() throws Exception { m_sc_sink.sink(bus_data()); assertEquals(1, m_written.size()); }
@Test(expected = AssertionError.class) public void cannot_sink_null_data() throws Exception { m_sc_sink.sink(null); }