@Test
public void testWriteAll_Multiple() throws IOException {

  // A series of uncompressed, compressed, uncompressed, compressed, uncompressed bytes.
  UnitTestZipEntry entryA =
      UnitTestZipArchive.makeUnitTestZipEntry("/bar", 3, "dragon lance", null);
  UnitTestZipEntry entryB =
      UnitTestZipArchive.makeUnitTestZipEntry("/baz", 8, "kender & hoopak", null);
  ByteArrayOutputStream expected = new ByteArrayOutputStream();
  // Write everything
  byte[] expectedBytes1 = new byte[] {1, 2, 3, 4, 5};
  expected.write(expectedBytes1);
  stream.pipe(new ByteArrayInputStream(expectedBytes1), Mode.COPY);
  stream.pipe(
      new ByteArrayInputStream(entryA.getCompressedBinaryContent()), Mode.UNCOMPRESS_NOWRAP);
  expected.write(entryA.getUncompressedBinaryContent());
  byte[] expectedBytes3 = new byte[] {6, 7, 8, 9, 0};
  stream.pipe(new ByteArrayInputStream(expectedBytes3), Mode.COPY);
  expected.write(expectedBytes3);
  stream.pipe(
      new ByteArrayInputStream(entryB.getCompressedBinaryContent()), Mode.UNCOMPRESS_NOWRAP);
  expected.write(entryB.getUncompressedBinaryContent());
  byte[] expectedBytes5 = new byte[] {127, 127, 127, 127, 127, 127};
  stream.pipe(new ByteArrayInputStream(expectedBytes5), Mode.COPY);
  expected.write(expectedBytes5);
  Assert.assertArrayEquals(expected.toByteArray(), outBuffer.toByteArray());
}