@Test
public void testWrite_GapAndCompression() throws IOException {

  // Write uncompressed data followed by compressed data
  stream =
      new PartiallyCompressingOutputStream(
          Collections.singletonList(COMPRESS_RANGE_1), outBuffer, 32768);
  byte[] input = fuse(PREAMBLE_BYTES, ENTRY1.getUncompressedBinaryContent());
  byte[] expected = fuse(PREAMBLE_BYTES, ENTRY1.getCompressedBinaryContent());
  stream.write(input);
  stream.flush();
  Assert.assertArrayEquals(expected, outBuffer.toByteArray());
}