@Test
    public void httpMethodDoesNotRequireAuthentication() {
        testFilter = new BasicHttpAuthenticationFilter();

        HttpServletRequest request = mock(HttpServletRequest.class);
        when(request.getMethod()).then(args -> "GET");

        HttpServletResponse response = mock(HttpServletResponse.class);

        runWithSubject(subject -> {
            boolean accessAllowed = testFilter.isAccessAllowed(request, response, new String[] {"POST", "PUT", "DELETE"});
            assertTrue(accessAllowed, "Access not allowed for GET");
        });
    }
Test case for {@link BasicHttpAuthenticationFilter}.

@since 1.0
web/src/test/java/org/apache/shiro/web/filter/authc/BasicHttpFilterAuthenticationTest.java