Http2Settings extends CharObjectHashMap<Long> { public Integer maxHeaderListSize() { Integer value = getIntValue(SETTINGS_MAX_HEADER_LIST_SIZE); if (value != null && value < 0) { value = Integer.MAX_VALUE; } return value; } Http2Settings();  Http2Settings(int initialCapacity, float loadFactor);  Http2Settings(int initialCapacity); @Override Long put(char key, Long value); Long headerTableSize(); Http2Settings headerTableSize(int value); Boolean pushEnabled(); Http2Settings pushEnabled(boolean enabled); Long maxConcurrentStreams(); Http2Settings maxConcurrentStreams(long value); Integer initialWindowSize(); Http2Settings initialWindowSize(int value); Integer maxFrameSize(); Http2Settings maxFrameSize(int value); Integer maxHeaderListSize(); Http2Settings maxHeaderListSize(int value); Http2Settings copyFrom(Http2Settings settings); Integer getIntValue(char key);  }
@Test public void boundarySettingsShouldBeSet() { final long overIntegerMaxValue = 1L << 31; settings.maxHeaderListSize((int) overIntegerMaxValue); assertEquals(Integer.MAX_VALUE, (long) settings.maxHeaderListSize()); final long settingsValueUpperBound = (1L << 32) - 1L; settings.maxHeaderListSize((int) settingsValueUpperBound); assertEquals(Integer.MAX_VALUE, (long) settings.maxHeaderListSize()); }