MgrProviderImpl implements MgrProvider { @NotNull @Override public PrivilegeManager getPrivilegeManager() { checkRootInitialized(); if (privilegeManager == null) { privilegeManager = getSecurityProvider().getConfiguration(PrivilegeConfiguration.class).getPrivilegeManager(root, namePathMapper); } return privilegeManager; } MgrProviderImpl(@NotNull PrincipalBasedAuthorizationConfiguration config);   MgrProviderImpl(@NotNull PrincipalBasedAuthorizationConfiguration config, @NotNull Root root, @NotNull NamePathMapper namePathMapper); @NotNull @Override SecurityProvider getSecurityProvider(); @Override void reset(@NotNull Root root, NamePathMapper namePathMapper); @NotNull @Override Root getRoot(); @NotNull @Override NamePathMapper getNamePathMapper(); @NotNull @Override Context getContext(); @NotNull @Override PrivilegeManager getPrivilegeManager(); @NotNull @Override PrivilegeBitsProvider getPrivilegeBitsProvider(); @NotNull @Override PrincipalManager getPrincipalManager(); @NotNull @Override RestrictionProvider getRestrictionProvider(); @NotNull @Override TreeProvider getTreeProvider(); @NotNull @Override RootProvider getRootProvider();  }
@Test public void testGetPrivilegeManager() { PrivilegeManager pm = mgrProvider.getPrivilegeManager(); assertSame(pm, mgrProvider.getPrivilegeManager()); mgrProvider.reset(root, getNamePathMapper()); assertNotSame(pm, mgrProvider.getPrivilegeManager()); }