@Test
public void testOutputBuffer() {

  final int size = 100;
  final OutputBuffer output1 = new OutputBuffer(BufferType.DIRECT_BUFFER, size);
  assertThat(output1.getType()).isEqualTo(BufferType.DIRECT_BUFFER);
  assertThat(output1.length()).isZero();
  assertThat(output1.limit()).isEqualTo(size);
  final OutputBuffer output2 = new OutputBuffer(BufferType.HEAP_BUFFER, size);
  assertThat(output2.getType()).isEqualTo(BufferType.HEAP_BUFFER);
  assertThat(output2.length()).isZero();
  assertThat(output2.limit()).isEqualTo(size);
  final OutputBuffer output3 = new OutputBuffer(new byte[size]);
  assertThat(output3.getType()).isEqualTo(BufferType.HEAP_BUFFER);
  assertThat(output3.length()).isZero();
  assertThat(output3.limit()).isEqualTo(size);
}