@Test
public void testReadingUnsignedLongWithMsbSetThrows() {

  ParsableByteArray parsableByteArray = getTestDataArray();
  // Given an array with the most-significant bit set on the top byte
  byte[] data = parsableByteArray.data;
  data[0] = (byte) 0x80;
  // Then reading an unsigned long throws.
  try {
    parsableByteArray.readUnsignedLongToLong();
    fail();
  } catch (Exception e) {
    // Expected.
  }
}