@Test
public void testReadOptionalUintSuccess() {
BaseDexBuffer dexBuf = new BaseDexBuffer(new byte[] {0x11, 0x22, 0x33, 0x44});
Assert.assertEquals(0x44332211, dexBuf.readSmallUint(0));
dexBuf = new BaseDexBuffer(new byte[] {0x00, 0x00, 0x00, 0x00});
Assert.assertEquals(0, dexBuf.readSmallUint(0));
dexBuf = new BaseDexBuffer(new byte[] {(byte)0xff, (byte)0xff, (byte)0xff, 0x7f});
Assert.assertEquals(0x7fffffff, dexBuf.readSmallUint(0));
dexBuf = new BaseDexBuffer(new byte[] {(byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff});
Assert.assertEquals(-1, dexBuf.readOptionalUint(0));
}