### Question:
WebArgumentResolverMethodParameterFilter implements MethodParameterFilter { public boolean matches(NativeWebRequest request, MethodParameter methodParameter) { if (this.webArgumentResolvers != null) { for (WebArgumentResolver resolver : this.webArgumentResolvers) { try { if (resolver.resolveArgument(methodParameter, request) != WebArgumentResolver.UNRESOLVED) { return true; } } catch (Exception e) { throw new IllegalStateException(e); } } } return false; } WebArgumentResolverMethodParameterFilter(WebArgumentResolver... webArgumentResolvers); boolean matches(NativeWebRequest request, MethodParameter methodParameter);  }### Answer:
@Test public void shouldAcceptNullWebArgumentResolver() throws Exception { WebArgumentResolverMethodParameterFilter f = new WebArgumentResolverMethodParameterFilter( (WebArgumentResolver[]) null); assertThat(f.matches(this.request, this.methodParameter), is(false)); }
@Test public void shouldFilterIfWebArgumentResolved() throws Exception { WebArgumentResolver w1 = mock(WebArgumentResolver.class); WebArgumentResolver w2 = mock(WebArgumentResolver.class); WebArgumentResolver w3 = mock(WebArgumentResolver.class); given(w1.resolveArgument(this.methodParameter, this.request)).willReturn(WebArgumentResolver.UNRESOLVED); given(w3.resolveArgument(this.methodParameter, this.request)).willReturn(WebArgumentResolver.UNRESOLVED); WebArgumentResolverMethodParameterFilter f = new WebArgumentResolverMethodParameterFilter(w1, w2, w3); assertThat(f.matches(this.request, this.methodParameter), is(true)); InOrder ordered = inOrder(w1, w2, w3); ordered.verify(w1).resolveArgument(this.methodParameter, this.request); ordered.verify(w2).resolveArgument(this.methodParameter, this.request); ordered.verify(w3, never()).resolveArgument(this.methodParameter, this.request); }