Http2Settings extends CharObjectHashMap<Long> { @Override public Long put(char key, Long value) { verifyStandardSetting(key, value); return super.put(key, value); } Http2Settings();  Http2Settings(int initialCapacity, float loadFactor);  Http2Settings(int initialCapacity); @Override Long put(char key, Long value); Long headerTableSize(); Http2Settings headerTableSize(long 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); Long maxHeaderListSize(); Http2Settings maxHeaderListSize(long value); Http2Settings copyFrom(Http2Settings settings); Integer getIntValue(char key); static Http2Settings defaultSettings();  }
@Test public void nonStandardSettingsShouldBeSet() { char key = 0; settings.put(key, (Long) 123L); assertEquals(123L, (long) settings.get(key)); }
@Test public void settingsShouldSupportUnsignedShort() { char key = (char) (Short.MAX_VALUE + 1); settings.put(key, (Long) 123L); assertEquals(123L, (long) settings.get(key)); }
@Test public void headerTableSizeUnsignedInt() { settings.put(Http2CodecUtil.SETTINGS_HEADER_TABLE_SIZE, (Long) MAX_UNSIGNED_INT); assertEquals(MAX_UNSIGNED_INT, (long) settings.get(Http2CodecUtil.SETTINGS_HEADER_TABLE_SIZE)); }
@Test(expected = IllegalArgumentException.class) public void headerTableSizeBoundCheck() { settings.put(Http2CodecUtil.SETTINGS_HEADER_TABLE_SIZE, (Long) Long.MAX_VALUE); }
@Test(expected = IllegalArgumentException.class) public void headerTableSizeBoundCheck2() { settings.put(Http2CodecUtil.SETTINGS_HEADER_TABLE_SIZE, Long.valueOf(-1L)); }