@Test
public void testNewPipePartialReadSemantics() throws IOException {

  Pipe pipe = Pipe.open();
  int sz = 10;
  ByteBuffer buf = ByteBuffer.allocate(sz);
  pipe.sink().write(ByteBuffer.wrap("small".getBytes()));
  int rdSz = pipe.source().read(buf); // this operation blocks!
  assertTrue(rdSz <= sz);
}