@Test
public void testGetShort() {

   byte[] data = new byte[] {0, 1};
   ByteBuf byteBuffer = Unpooled.wrappedBuffer(data);
   NettyReadable buffer = new NettyReadable(byteBuffer);
   assertEquals(1, buffer.getShort());
   assertFalse(buffer.hasRemaining());
   try {
      buffer.getShort();
      fail("Should throw an IndexOutOfBoundsException");
   } catch (IndexOutOfBoundsException ioe) {
   }
}