@Test
public void discardsEventsAfterDisposal() throws Exception {

  // given a disposed connection
  connection = underTest.connect(recordingConsumer);
  connection.dispose();
  // when a message arrives
  connection.accept(1);
  // it is discarded
  recordingConsumer.assertValues();
}