### Question:
HpackEncoder { public void setMaxHeaderTableSize(final ByteBuf out, final long maxHeaderTableSize) throws Http2Exception { if (maxHeaderTableSize < MIN_HEADER_TABLE_SIZE || maxHeaderTableSize > MAX_HEADER_TABLE_SIZE) { throw connectionError( PROTOCOL_ERROR, "Header Table Size must be >= %d and <= %d but was %d", MIN_HEADER_TABLE_SIZE, MAX_HEADER_TABLE_SIZE, maxHeaderTableSize); } if (this.maxHeaderTableSize == maxHeaderTableSize) { return; } this.maxHeaderTableSize = maxHeaderTableSize; ensureCapacity(0); encodeInteger(out, 0x20, 5, maxHeaderTableSize); } HpackEncoder();   HpackEncoder(final boolean ignoreMaxHeaderListSize);   HpackEncoder(final boolean ignoreMaxHeaderListSize, final int arraySizeHint); void encodeHeaders(
      final int streamId,
      final ByteBuf out,
      final Http2Headers headers,
      final SensitivityDetector sensitivityDetector); void setMaxHeaderTableSize(final ByteBuf out, final long maxHeaderTableSize); long getMaxHeaderTableSize(); void setMaxHeaderListSize(final long maxHeaderListSize); long getMaxHeaderListSize();  }### Answer:
@Test(expected = Http2Exception.class) public void testSetMaxHeaderTableSizeOverflow() throws Http2Exception { final ByteBuf buf = Unpooled.buffer(); try { hpackEncoder.setMaxHeaderTableSize(buf, MAX_HEADER_TABLE_SIZE + 1); } finally { buf.release(); } }