CompositePrincipalConfiguration extends CompositeConfiguration<PrincipalConfiguration> implements PrincipalConfiguration { @NotNull @Override public PrincipalManager getPrincipalManager(Root root, NamePathMapper namePathMapper) { return new PrincipalManagerImpl(getPrincipalProvider(root, namePathMapper)); } CompositePrincipalConfiguration();  CompositePrincipalConfiguration(@NotNull SecurityProvider securityProvider); @NotNull @Override PrincipalManager getPrincipalManager(Root root, NamePathMapper namePathMapper); @NotNull @Override PrincipalProvider getPrincipalProvider(final Root root, final NamePathMapper namePathMapper);  }
@Test public void testEmptyGetPrincipalManager() { PrincipalManager pMgr = getComposite().getPrincipalManager(root, NamePathMapper.DEFAULT); assertTrue(pMgr instanceof PrincipalManagerImpl); }
@Test public void testSingleGetPrincipalManager() { PrincipalConfiguration testConfig = new TestPrincipalConfiguration(); addConfiguration(testConfig); PrincipalManager pMgr = getComposite().getPrincipalManager(root, NamePathMapper.DEFAULT); assertTrue(pMgr instanceof PrincipalManagerImpl); }
@Test public void testMultipleGetPrincipalManager() { addConfiguration(principalConfigurationMock); addConfiguration(new TestPrincipalConfiguration()); PrincipalManager pMgr = getComposite().getPrincipalManager(root, NamePathMapper.DEFAULT); assertTrue(pMgr instanceof PrincipalManagerImpl); }