DefaultPipeChannel implements PipeChannel { static PipeChannel open(Path path) throws IOException { DockerCloudUtils.requireNonNull(path, "Path cannot be null."); return new DefaultPipeChannel(AsynchronousFileChannel.open(path, StandardOpenOption.READ, StandardOpenOption.WRITE)); } 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 public void invalidPath() throws IOException { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> DefaultPipeChannel.open(null)); }