bb.put((byte)0xff).put((byte)0xff).put((byte)0xff).put((byte)0xff);
bb.position(0);
bb.limit(8);
BigInteger bi = Unsigned.getUnsignedLong(bb);
BigInteger uLongMax = new BigInteger(ULONG_MAX);
for (int i = 0; i < uLongMax.bitCount(); ++i) {
TestCase.assertTrue("Bit: " + i + " should be: " + uLongMax.testBit(i),
uLongMax.testBit(i) == bi.testBit(i));
}
TestCase.assertEquals(ULONG_MAX, bi.toString());