HttpDecoderSpec implements Supplier<T> { public T validateHeaders(boolean validate) { this.validateHeaders = validate; return get(); }  T maxInitialLineLength(int value); int maxInitialLineLength(); T maxHeaderSize(int value); int maxHeaderSize(); T maxChunkSize(int value); int maxChunkSize(); T validateHeaders(boolean validate); boolean validateHeaders(); T initialBufferSize(int value); int initialBufferSize(); T h2cMaxContentLength(int h2cMaxContentLength); int h2cMaxContentLength(); @Override boolean equals(Object o); @Override int hashCode(); static final int DEFAULT_MAX_INITIAL_LINE_LENGTH; static final int DEFAULT_MAX_HEADER_SIZE; static final int DEFAULT_MAX_CHUNK_SIZE; static final boolean DEFAULT_VALIDATE_HEADERS; static final int DEFAULT_INITIAL_BUFFER_SIZE; }
@Test public void validateHeaders() { conf.validateHeaders(false); assertThat(conf.validateHeaders()).as("validate headers").isFalse(); assertThat(conf.maxInitialLineLength()).as("default initial line length").isEqualTo(HttpDecoderSpec.DEFAULT_MAX_INITIAL_LINE_LENGTH); assertThat(conf.maxHeaderSize()).as("default header size").isEqualTo(HttpDecoderSpec.DEFAULT_MAX_HEADER_SIZE); assertThat(conf.maxChunkSize()).as("default chunk size").isEqualTo(HttpDecoderSpec.DEFAULT_MAX_CHUNK_SIZE); assertThat(conf.initialBufferSize()).as("default initial buffer sizes").isEqualTo(HttpDecoderSpec.DEFAULT_INITIAL_BUFFER_SIZE); }