MgrProviderImpl implements MgrProvider { @Override public void reset(@NotNull Root root, NamePathMapper namePathMapper) { this.root = root; this.namePathMapper = namePathMapper; this.ctx = null; this.restrictionProvider = null; this.principalManager = null; this.privilegeManager = null; this.privilegeBitsProvider = null; } 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 testReset() { MgrProvider mp = new MgrProviderImpl(mock(PrincipalBasedAuthorizationConfiguration.class)); Root r = mock(Root.class); NamePathMapper mapper = mock(NamePathMapper.class); mp.reset(r, mapper); assertSame(r, mp.getRoot()); assertSame(mapper, mp.getNamePathMapper()); }