@Test
public void testFiveSectionsInTwoPackets() {

  packetPayload[0] = 0; // The first packet includes a pointer_field.
  insertTableSection(1, (byte) 101, 10);
  insertTableSection(14, (byte) 102, 10);
  insertTableSection(27, (byte) 103, 10);
  packetPayload[40] = 0; // The second packet includes a pointer_field.
  insertTableSection(41, (byte) 104, 10);
  insertTableSection(54, (byte) 105, 10);
  ParsableByteArray firstPacket = new ParsableByteArray(packetPayload, 40);
  reader.consume(firstPacket, FLAG_PAYLOAD_UNIT_START_INDICATOR);
  assertThat(payloadReader.parsedTableIds).isEqualTo(asList(101, 102, 103));
  ParsableByteArray secondPacket = new ParsableByteArray(packetPayload);
  secondPacket.setPosition(40);
  reader.consume(secondPacket, FLAG_PAYLOAD_UNIT_START_INDICATOR);
  assertThat(payloadReader.parsedTableIds).isEqualTo(asList(101, 102, 103, 104, 105));
}