### Question:
JWTAuthenticationFilter extends OncePerRequestFilter { @Override protected boolean shouldNotFilter(HttpServletRequest request) { return EXCLUDED_URLS.stream() .anyMatch(p -> matcher.match(p, request.getServletPath())); }  @Override void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain);  }### Answer:
@Test void shouldNotFilter() { when(request.getServletPath()).thenReturn("/someUrl/login"); boolean result = filter.shouldNotFilter(request); assertTrue(result); }