@Test
public void testReadUnsignedLongToLong() {

  testReadUnsignedLongToLong(0);
  testReadUnsignedLongToLong(1);
  testReadUnsignedLongToLong(Long.MAX_VALUE);
  try {
    testReadUnsignedLongToLong(-1);
    fail();
  } catch (IllegalStateException e) {
    // Expected.
  }
  try {
    testReadUnsignedLongToLong(Long.MIN_VALUE);
    fail();
  } catch (IllegalStateException e) {
    // Expected.
  }
}