@Test
public void testReadUnsignedIntToInt() {

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