added eg.OffHeapByteArrayExampleTest

This commit is contained in:
Rob Austin
2015-07-25 15:29:56 +03:00
committed by leventov
parent d63c8c9811
commit c2f4e0b240
@@ -54,16 +54,18 @@ public class OffHeapByteArrayExampleTest {
chm.put(key, value);
// clear the byteValue just to prove it works when we read it back
byteValue.setValue((byte) '0');
// clear the value to prove it works
byteValue.setValue((byte) 0);
value.setByteValueAt(1, byteValue);
chm.getUsing(key, value);
Assert.assertEquals(0, value.getByteValueAt(2).getValue());
Assert.assertEquals(0, value.getByteValueAt(3).getValue());
byte actual = value.getByteValueAt(1).getValue();
Assert.assertEquals(EXPECTED, actual);
Assert.assertEquals(0, value.getByteValueAt(2).getValue());
Assert.assertEquals(0, value.getByteValueAt(3).getValue());
}
}