@Test
public void testWrite_GapAndCompressionAndGap() throws IOException {

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