/**
* Test for example presented in section 107.3.2 of OSGi compendium v4.2.
*/
public void testAuthorizationExampleOk() {
// Action groups...
Group alarmSystemControl = createGroup("AlarmSystemControl");
Group internetAccess = createGroup("InternetAccess");
Group temperatureControl = createGroup("TemperatureControl");
Group photoAlbumEdit = createGroup("PhotoAlbumEdit");
Group photoAlbumView = createGroup("PhotoAlbumView");
Group portForwarding = createGroup("PortForwarding");
// System user groups...
Group administrators = createGroup("Administrators");
Group buddies = createGroup("Buddies");
Group children = createGroup("Children");
Group adults = createGroup("Adults");
Group residents = createGroup("Residents");
// Users
User elmer = RoleFactory.createUser("Elmer");
User fudd = RoleFactory.createUser("Fudd");
User marvin = RoleFactory.createUser("Marvin");
User pepe = RoleFactory.createUser("Pepe");
User daffy =RoleFactory.createUser("Daffy");
User foghorn = RoleFactory.createUser("Foghorn");
// Not explicitly mentioned; but needed to comply with the semantics
alarmSystemControl.addRequiredMember(m_anyone);
internetAccess.addRequiredMember(m_anyone);
temperatureControl.addRequiredMember(m_anyone);
photoAlbumEdit.addRequiredMember(m_anyone);
photoAlbumView.addRequiredMember(m_anyone);
portForwarding.addRequiredMember(m_anyone);
administrators.addRequiredMember(m_anyone);
buddies.addRequiredMember(m_anyone);
children.addRequiredMember(m_anyone);
adults.addRequiredMember(m_anyone);
residents.addRequiredMember(m_anyone);
// Table 107.1
residents.addMember(elmer);
residents.addMember(fudd);
residents.addMember(marvin);
residents.addMember(pepe);
buddies.addMember(daffy);
buddies.addMember(foghorn);
children.addMember(marvin);