@Test(timeout = 10000)
public void targetChannelClosed() throws Exception {

    testChannel = new TestPipeChannel();
    PipeChannelInputStream input = new PipeChannelInputStream(testChannel, Duration.ofSeconds(1));
    CompletableFuture<Void> futur = runAsync(() -> {
        int n = input.read();
        assertThat(n).isEqualTo(-1);
    });
    testChannel.shutdownOutputStreams();
    futur.get(500, TimeUnit.MILLISECONDS);
}