@Test
public void testHeaderSplitAcrossPackets() {

  packetPayload[0] = 3; // The first packet includes a pointer_field.
  insertTableSection(4, (byte) 100, 3); // This section header spreads across both packets.
  ParsableByteArray firstPacket = new ParsableByteArray(packetPayload, 5);
  reader.consume(firstPacket, FLAG_PAYLOAD_UNIT_START_INDICATOR);
  assertThat(payloadReader.parsedTableIds).isEmpty();
  ParsableByteArray secondPacket = new ParsableByteArray(packetPayload);
  secondPacket.setPosition(5);
  reader.consume(secondPacket, /* flags= */ 0);
  assertThat(payloadReader.parsedTableIds).isEqualTo(singletonList(100));
}