|
48 | 48 | import org.mockito.MockitoAnnotations; |
49 | 49 |
|
50 | 50 | @RunWith(JUnit4.class) |
| 51 | +@SuppressWarnings({ "rawtypes", "unchecked" }) |
51 | 52 | public class CompositeFilterTest { |
52 | 53 |
|
53 | 54 | private final CompositeFilter.Provider provider = new CompositeFilter.Provider(); |
@@ -157,7 +158,6 @@ public void parseConfig() { |
157 | 158 | } |
158 | 159 |
|
159 | 160 | @Test |
160 | | - @SuppressWarnings("unchecked") |
161 | 161 | public void clientInterceptorDelegates() { |
162 | 162 | // Setup Config with simple matcher equivalent logic |
163 | 163 | Matcher.OnMatch matchAction = Matcher.OnMatch.newBuilder() |
@@ -255,9 +255,8 @@ public void clientInterceptorDelegates() { |
255 | 255 | } |
256 | 256 |
|
257 | 257 | @Test |
258 | | - @SuppressWarnings("unchecked") |
259 | 258 | public void clientInterceptorSkips() { |
260 | | - // Same setup but no match |
| 259 | + // Setup Config with simple matcher equivalent logic with no match |
261 | 260 | Matcher matcher = Matcher.newBuilder().build(); |
262 | 261 |
|
263 | 262 | ExtensionWithMatcher proto = ExtensionWithMatcher.newBuilder() |
@@ -289,12 +288,12 @@ public void clientInterceptorSkips() { |
289 | 288 | Metadata headers = new Metadata(); |
290 | 289 | call.start(mock(ClientCall.Listener.class), headers); |
291 | 290 |
|
| 291 | + verify(fakeClientInterceptor, org.mockito.Mockito.never()).interceptCall(any(), any(), any()); |
292 | 292 | verify(next).newCall(any(), any()); |
293 | 293 | verify(nextCall).start(any(), eq(headers)); |
294 | 294 | } |
295 | 295 |
|
296 | 296 | @Test |
297 | | - @SuppressWarnings("unchecked") |
298 | 297 | public void clientInterceptorDelegatesChain() { |
299 | 298 | // Setup Chain Action |
300 | 299 | TypedExtensionConfig child1 = TypedExtensionConfig.newBuilder() |
@@ -393,7 +392,6 @@ public void clientInterceptorDelegatesChain() { |
393 | 392 | fakeClientInterceptor = mock(ClientInterceptor.class); |
394 | 393 | when(fakeFilter.buildClientInterceptor(any(), any(), any())).thenReturn(fakeClientInterceptor); |
395 | 394 |
|
396 | | - ClientCall childCall = mock(ClientCall.class); |
397 | 395 | org.mockito.Mockito.doAnswer(invocation -> { |
398 | 396 | io.grpc.Channel nextArg = (io.grpc.Channel) invocation.getArguments()[2]; |
399 | 397 | return nextArg.newCall( |
|
0 commit comments