@Test
void testWrite() throws IOException {

  String input = "hello world";
  buffer.put(input.getBytes());
  buffer.flip();
  BufferUtil.write(buffer, output);
  byte[] result = output.toByteArray();
  assertEquals(input, new String(result));
}