@@ -56,7 +56,7 @@ void beforeEach() {
5656 }
5757
5858 @ Test
59- void shouldInvokeInterceptors () throws Exception {
59+ void invokeInterceptors () throws Exception {
6060 List <ClientHttpRequestInterceptor > interceptors = new ArrayList <>();
6161 interceptors .add (new NoOpInterceptor ());
6262 interceptors .add (new NoOpInterceptor ());
@@ -74,7 +74,7 @@ void shouldInvokeInterceptors() throws Exception {
7474 }
7575
7676 @ Test
77- void shouldSkipIntercetor () throws Exception {
77+ void skipInterceptor () throws Exception {
7878 List <ClientHttpRequestInterceptor > interceptors = new ArrayList <>();
7979 interceptors .add ((request , body , execution ) -> responseMock );
8080 interceptors .add (new NoOpInterceptor ());
@@ -89,7 +89,7 @@ void shouldSkipIntercetor() throws Exception {
8989 }
9090
9191 @ Test
92- void interceptorShouldUpdateRequestHeader () throws Exception {
92+ void updateRequestHeader () throws Exception {
9393 final String headerName = "Foo" ;
9494 final String headerValue = "Bar" ;
9595 final String otherValue = "Baz" ;
@@ -115,7 +115,7 @@ protected ClientHttpResponse executeInternal() {
115115 }
116116
117117 @ Test
118- void interceptorShouldUpdateRequestAttribute () throws Exception {
118+ void updateRequestAttribute () throws Exception {
119119 final String attrName = "Foo" ;
120120 final String attrValue = "Bar" ;
121121
@@ -137,7 +137,7 @@ protected ClientHttpResponse executeInternal() {
137137 }
138138
139139 @ Test
140- void interceptorShouldUpdateRequestURI () throws Exception {
140+ void updateRequestURI () throws Exception {
141141 final URI changedUri = URI .create ("https://example.com/2" );
142142
143143 ClientHttpRequestInterceptor interceptor = (request , body , execution ) -> execution .execute (new HttpRequestWrapper (request ) {
@@ -161,7 +161,7 @@ public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IO
161161 }
162162
163163 @ Test
164- void interceptorShouldUpdateRequestMethod () throws Exception {
164+ void updateRequestMethod () throws Exception {
165165 final HttpMethod changedMethod = HttpMethod .POST ;
166166
167167 ClientHttpRequestInterceptor interceptor = (request , body , execution ) -> execution .execute (new HttpRequestWrapper (request ) {
@@ -185,7 +185,7 @@ public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IO
185185 }
186186
187187 @ Test
188- void interceptorShouldUpdateRequestBody () throws Exception {
188+ void updateRequestBody () throws Exception {
189189 final byte [] changedBody = "Foo" .getBytes ();
190190 ClientHttpRequestInterceptor interceptor = (request , body , execution ) -> execution .execute (request , changedBody );
191191 requestFactory = new InterceptingClientHttpRequestFactory (requestFactoryMock , Collections .singletonList (interceptor ));
@@ -197,7 +197,7 @@ void interceptorShouldUpdateRequestBody() throws Exception {
197197 }
198198
199199 @ Test
200- void interceptorShouldAlwaysExecuteNextInterceptor () throws Exception {
200+ void multipleExecutions () throws Exception {
201201 List <ClientHttpRequestInterceptor > interceptors = new ArrayList <>();
202202 interceptors .add (new MultipleExecutionInterceptor ());
203203 interceptors .add (new NoOpInterceptor ());
@@ -217,18 +217,21 @@ private static class NoOpInterceptor implements ClientHttpRequestInterceptor {
217217 private int invocationCount = 0 ;
218218
219219 @ Override
220- public ClientHttpResponse intercept (HttpRequest request , byte [] body , ClientHttpRequestExecution execution )
221- throws IOException {
220+ public ClientHttpResponse intercept (
221+ HttpRequest request , byte [] body , ClientHttpRequestExecution execution ) throws IOException {
222+
222223 invocationCount ++;
223224 return execution .execute (request , body );
224225 }
225226 }
226227
228+
227229 private static class MultipleExecutionInterceptor implements ClientHttpRequestInterceptor {
228230
229231 @ Override
230- public ClientHttpResponse intercept (HttpRequest request , byte [] body , ClientHttpRequestExecution execution )
231- throws IOException {
232+ public ClientHttpResponse intercept (
233+ HttpRequest request , byte [] body , ClientHttpRequestExecution execution ) throws IOException {
234+
232235 // execute another request first
233236 execution .execute (new MockClientHttpRequest (), body );
234237 return execution .execute (request , body );
0 commit comments