AuthenticationEntryPoint firstAEP = mock(AuthenticationEntryPoint.class);
RequestMatcher firstRM = mock(RequestMatcher.class);
AuthenticationEntryPoint secondAEP = mock(AuthenticationEntryPoint.class);
RequestMatcher secondRM = mock(RequestMatcher.class);
when(firstRM.matches(request)).thenReturn(false);
when(secondRM.matches(request)).thenReturn(true);
entryPoints.put(firstRM, firstAEP);
entryPoints.put(secondRM, secondAEP);
daep.commence(request, null, null);