### Question:
PureJavaCrc32 implements Checksum { public void update(byte[] b, int off, int len) { int localCrc = crc; while(len > 7) { int c0 = b[off++] ^ localCrc; int c1 = b[off++] ^ (localCrc >>>= 8); int c2 = b[off++] ^ (localCrc >>>= 8); int c3 = b[off++] ^ (localCrc >>>= 8); localCrc = (T8_7[c0 & 0xff] ^ T8_6[c1 & 0xff]) ^ (T8_5[c2 & 0xff] ^ T8_4[c3 & 0xff]); localCrc ^= (T8_3[b[off++] & 0xff] ^ T8_2[b[off++] & 0xff]) ^ (T8_1[b[off++] & 0xff] ^ T8_0[b[off++] & 0xff]); len -= 8; } while(len > 0) { localCrc = (localCrc >>> 8) ^ T8_0[(localCrc ^ b[off++]) & 0xff]; len--; } crc = localCrc; } PureJavaCrc32(); long getValue(); void reset(); void update(byte[] b, int off, int len); final void update(int b);  }### Answer:
@Test public void testCorrectness() throws Exception { checkSame(); theirs.update(104); ours.update(104); checkSame(); checkOnBytes(new byte[] {40, 60, 97, -70}, false); checkOnBytes("hello world!".getBytes("UTF-8"), false); for (int i = 0; i < 10000; i++) { byte randomBytes[] = new byte[new Random().nextInt(2048)]; new Random().nextBytes(randomBytes); checkOnBytes(randomBytes, false); } }