assertEquals("Number of entries = 2", 2, entries.size());
// First Entry
Object entry = entries.get(0);
assertTrue("Entry instanceof AppConfigurationEntry", entry instanceof AuthModuleEntry);
AuthModuleEntry ace = (AuthModuleEntry) entry;
assertEquals("LM Name", "TestAuthModule", ace.getAuthModuleName());
assertEquals("Required", ControlFlag.REQUIRED, ace.getControlFlag());
Map<String, ?> aceOptions = ace.getOptions();
assertEquals("Number of options = 3", 3, aceOptions.size());
assertEquals("usersProperties=u", "u", aceOptions.get("usersProperties"));
assertEquals("rolesProperties=r", "r", aceOptions.get("rolesProperties"));
assertEquals("unauthenticatedIdentity=anonymous", "anonymous", aceOptions.get("unauthenticatedIdentity"));
// Second Entry
entry = entries.get(1);
assertTrue("Entry instanceof AppConfigurationEntry", entry instanceof AuthModuleEntry);
ace = (AuthModuleEntry) entry;
assertEquals("LM Name", "TestAuthModule2", ace.getAuthModuleName());
assertEquals("Required", ControlFlag.REQUIRED, ace.getControlFlag());
aceOptions = ace.getOptions();
assertEquals("Number of options = 0", 0, aceOptions.size());
LoginModuleStackHolder lmsh = ace.getLoginModuleStackHolder();
assertEquals("lm-stack", "lm-stack", lmsh.getName());
AppConfigurationEntry[] appEntries = lmsh.getAppConfigurationEntry();
assertEquals("App Entries in LMSH=1", 1, appEntries.length);
Object appEntry = appEntries[0];