AbstractReadableBuffer implements ReadableBuffer { @Override public final int readUnsignedMedium() { checkReadable(3); int b1 = readUnsignedByte(); int b2 = readUnsignedByte(); int b3 = readUnsignedByte(); return b1 << 16 | b2 << 8 | b3; }  @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 readUnsignedMediumShouldSucceed() { mockBytes(0xFF, 0xEE, 0xDD); assertEquals(0xFFEEDD, buffer.readUnsignedMedium()); }