@Test
public void testWrapDouble() {

    ByteBuf buffer = copyDouble(1, 4);
    assertEquals(16, buffer.capacity());
    assertEquals(1, buffer.readDouble(), 0.01);
    assertEquals(4, buffer.readDouble(), 0.01);
    assertFalse(buffer.isReadable());
    buffer.release();
    buffer = copyDouble(null);
    assertEquals(0, buffer.capacity());
    buffer.release();
    buffer = copyDouble(new double[] {});
    assertEquals(0, buffer.capacity());
    buffer.release();
}