Merge branch '2.0.x'

This commit is contained in:
Andy Wilkinson
2022-06-20 20:44:07 +01:00
8 changed files with 17 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -149,7 +149,7 @@ public final class Preprocessors {
/**
* Returns a {@code HeadersModifyingOperationPreprocessor} that can then be configured
* to modify the headers of the request.
* to modify the headers of the request or response.
* @return the preprocessor
* @since 3.0.0
*/

View File

@@ -90,10 +90,10 @@ public class HeadersModifyingOperationPreprocessorTests {
@Test
public void removeHeader() {
OperationPreprocessor preprocessor = this.preprocessor.remove("a");
assertThat(preprocessor.preprocess(createRequest((headers) -> headers.add("a", "apple"))).getHeaders())
this.preprocessor.remove("a");
assertThat(this.preprocessor.preprocess(createRequest((headers) -> headers.add("a", "apple"))).getHeaders())
.doesNotContainKey("a");
assertThat(preprocessor.preprocess(createResponse((headers) -> headers.add("a", "apple"))).getHeaders())
assertThat(this.preprocessor.preprocess(createResponse((headers) -> headers.add("a", "apple"))).getHeaders())
.doesNotContainKey("a");
}