DefaultPipeChannel implements PipeChannel { @Override public boolean isOpen() { return wrappedChannel.isOpen(); } private  DefaultPipeChannel(AsynchronousFileChannel wrappedChannel); @Override Future<Integer> read(ByteBuffer bb); @Override Future<Integer> write(ByteBuffer bb); @Override boolean isOpen(); @Override void close(); @Override int available();  }
@Test(timeout = 10000) public void isOpen() throws IOException { PipeChannel channel = DefaultPipeChannel.open(tempFile()); assertThat(channel.isOpen()).isTrue().as("channel is initially open"); channel.close(); assertThat(channel.isOpen()).isFalse(); }