MgrProviderImpl implements MgrProvider { @NotNull @Override public Root getRoot() { checkRootInitialized(); return root; } 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 testGetRoot() { assertSame(root, mgrProvider.getRoot()); }
@Test(expected = IllegalStateException.class) public void testRootNotInitialized() { MgrProvider mp = new MgrProviderImpl(mock(PrincipalBasedAuthorizationConfiguration.class)); mp.getRoot(); }