public void testSimpleInterfaceBasedConfigs()
{
viewConfigExtension.addPageDefinition(SimpleInterfaceBasedConfigs.Wizards.Registration.Step1.class);
viewConfigExtension.addPageDefinition(SimpleInterfaceBasedConfigs.Wizards.Order.Step1.class);
ViewConfigEntry registrationConfigEntry = ViewConfigCache.getViewDefinition(SimpleInterfaceBasedConfigs.Wizards.Registration.Step1.class);
ViewConfigEntry orderConfigEntry = ViewConfigCache.getViewDefinition(SimpleInterfaceBasedConfigs.Wizards.Order.Step1.class);
assertEquals(registrationConfigEntry.getViewId(),
"/pages/wizards/registration/step1.xhtml");
assertEquals(orderConfigEntry.getViewId(),
"/pages/wizards/order/step1.xhtml");
assertEquals(registrationConfigEntry.getNavigationMode(), Page.NavigationMode.DEFAULT);
assertEquals(orderConfigEntry.getNavigationMode(), Page.NavigationMode.REDIRECT);
assertTrue(registrationConfigEntry.getAccessDecisionVoters().size() == 0);
assertEquals(orderConfigEntry.getAccessDecisionVoters().size(), 1);
assertEquals(orderConfigEntry.getAccessDecisionVoters().iterator().next(), TestAccessDecisionVoter1.class);
}