@Test
public void toArray() throws BufferException {

    ByteBuffer buffer = new ByteBuffer(TEST_BYTES1);
    byte[] copyArray = buffer.toArray();
    Assert.assertArrayEquals(TEST_BYTES1, copyArray);
}