@Test
public void testDivineDeflateParameters_BadCloseInputStreamFactory() throws IOException {

  final JreDeflateParameters parameters = JreDeflateParameters.of(1, 0, true);
  final byte[] buffer = deflate(parameters);
  // The factory here will produce streams that throw exceptions when close() is called.
  // These exceptions should be ignored.
  JreDeflateParameters result =
      diviner.divineDeflateParameters(new ByteArrayInputStreamFactory(buffer, true, true));
  Assert.assertEquals(result, parameters);
}