@Test
public void testCrcChecks() {

  byte[] correctCrcPat = new byte[] {
      (byte) 0x0, (byte) 0x0, (byte) 0xb0, (byte) 0xd, (byte) 0x0, (byte) 0x1, (byte) 0xc1,
      (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1, (byte) 0xe1, (byte) 0x0, (byte) 0xe8,
      (byte) 0xf9, (byte) 0x5e, (byte) 0x7d};
  byte[] incorrectCrcPat = Arrays.copyOf(correctCrcPat, correctCrcPat.length);
  // Crc field is incorrect, and should not be passed to the payload reader.
  incorrectCrcPat[16]--;
  reader.consume(new ParsableByteArray(correctCrcPat), FLAG_PAYLOAD_UNIT_START_INDICATOR);
  assertThat(payloadReader.parsedTableIds).isEqualTo(singletonList(0));
  reader.consume(new ParsableByteArray(incorrectCrcPat), FLAG_PAYLOAD_UNIT_START_INDICATOR);
  assertThat(payloadReader.parsedTableIds).isEqualTo(singletonList(0));
}