### Question:
GzipInflatingBuffer implements Closeable { boolean hasPartialData() { checkState(!closed, "GzipInflatingBuffer is closed"); return gzipMetadataReader.readableBytes() != 0 || state != State.HEADER; }  @Override void close();  }### Answer:
@Test public void hasPartialData() throws Exception { assertFalse("no partial data expected", gzipInflatingBuffer.hasPartialData()); gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(new byte[1])); byte[] b = new byte[originalData.length]; assertEquals(originalData.length, gzipInflatingBuffer.inflateBytes(b, 0, originalData.length)); assertTrue("inflated data does not match", Arrays.equals(originalData, b)); assertTrue("partial data expected", gzipInflatingBuffer.hasPartialData()); }