@Test
public void nullDisposableConsumerReturnedToConnectThrowsNPE() throws Exception {

  underTest =
      new DiscardAfterDisposeConnectable<>(
          new Connectable<Integer, String>() {
            @Nonnull
            @Override
            public Connection<Integer> connect(Consumer<String> output) {
              //noinspection ConstantConditions
              return null;
            }
          });
  assertThatThrownBy(() -> underTest.connect(recordingConsumer))
      .isInstanceOf(NullPointerException.class);
}