Polish test code

Polish a few issue identified when adding checkstyle to the
build. Although checkstyle is not enforcing rules on tests,
these are a few minor changes that are still worth making.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-13 21:36:42 -07:00
committed by Juergen Hoeller
parent 81451aa800
commit 1c25cec44f
17 changed files with 99 additions and 100 deletions

View File

@@ -531,7 +531,7 @@ public class HttpEntityMethodProcessorMockTests {
then(resourceRegionMessageConverter).should(times(1)).write(
anyCollection(), eq(APPLICATION_OCTET_STREAM),
argThat(outputMessage -> outputMessage.getHeaders().getFirst(HttpHeaders.ACCEPT_RANGES) == "bytes"));
argThat(outputMessage -> "bytes".equals(outputMessage.getHeaders().getFirst(HttpHeaders.ACCEPT_RANGES))));
assertEquals(206, servletResponse.getStatus());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -392,7 +392,7 @@ public class RequestResponseBodyMethodProcessorMockTests {
then(resourceRegionMessageConverter).should(times(1)).write(
anyCollection(), eq(MediaType.APPLICATION_OCTET_STREAM),
argThat(outputMessage -> outputMessage.getHeaders().getFirst(HttpHeaders.ACCEPT_RANGES) == "bytes"));
argThat(outputMessage -> "bytes".equals(outputMessage.getHeaders().getFirst(HttpHeaders.ACCEPT_RANGES))));
assertEquals(206, servletResponse.getStatus());
}