diff options
Diffstat (limited to 'container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SimpleHttpClient.java')
-rw-r--r-- | container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SimpleHttpClient.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SimpleHttpClient.java b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SimpleHttpClient.java index 298f0feb9e6..23f89962752 100644 --- a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SimpleHttpClient.java +++ b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SimpleHttpClient.java @@ -158,6 +158,7 @@ public class SimpleHttpClient implements AutoCloseable { return this; } + @SuppressWarnings("deprecation") public ResponseValidator execute() throws IOException { if (entity != null) { request.setEntity(entity); @@ -189,18 +190,16 @@ public class SimpleHttpClient implements AutoCloseable { return this; } - public ResponseValidator expectHeader(String headerName, Matcher<String> matcher) { + public void expectHeader(String headerName, Matcher<String> matcher) { Header firstHeader = response.getFirstHeader(headerName); String headerValue = firstHeader != null ? firstHeader.getValue() : null; assertThat(headerValue, matcher); assertNotNull(firstHeader); - return this; } - public ResponseValidator expectNoHeader(String headerName) { + public void expectNoHeader(String headerName) { Header firstHeader = response.getFirstHeader(headerName); assertThat(firstHeader, is(nullValue())); - return this; } public ResponseValidator expectContent(final Matcher<String> matcher) { |