FilterProviderImpl implements FilterProvider { @NotNull @Override public Filter getFilter(@NotNull SecurityProvider securityProvider, @NotNull Root root, @NotNull NamePathMapper namePathMapper) { PrincipalProvider principalProvider = securityProvider.getConfiguration(PrincipalConfiguration.class).getPrincipalProvider(root, namePathMapper); return new FilterImpl(root, principalProvider, namePathMapper); }  @Override boolean handlesPath(@NotNull String oakPath); @NotNull @Override String getFilterRoot(); @NotNull @Override Filter getFilter(@NotNull SecurityProvider securityProvider, @NotNull Root root, @NotNull NamePathMapper namePathMapper);  }
@Test public void testGetFilter() { SecurityProvider sp = Mockito.spy(SecurityProviderBuilder.newBuilder().build()); Root root = mock(Root.class); Filter filter = provider.getFilter(sp, root, NamePathMapper.DEFAULT); assertNotNull(filter); Mockito.verify(sp, Mockito.times(1)).getConfiguration(PrincipalConfiguration.class); }