AbstractReadableBuffer implements ReadableBuffer { @Override public final int readUnsignedShort() { checkReadable(2); int b1 = readUnsignedByte(); int b2 = readUnsignedByte(); return b1 << 8 | b2; }  @Override final int readUnsignedMedium(); @Override final int readUnsignedShort(); @Override final int readInt(); @Override boolean hasArray(); @Override byte[] array(); @Override int arrayOffset(); @Override void close();  }
@Test public void readUnsignedShortShouldSucceed() { mockBytes(0xFF, 0xEE); assertEquals(0xFFEE, buffer.readUnsignedShort()); }