@Test
public void testIsUserInRole() throws Exception {

    expect(externalContext.isUserInRole(eq("admin"))).andReturn(false);
    expect(externalContext.isUserInRole(eq("user"))).andReturn(true);
    expect(externalContext.isUserInRole(eq("manager"))).andReturn(false);
    expect(externalContext.isUserInRole(eq("guest"))).andReturn(false);
    expect(externalContext.isUserInRole(eq("supervisor"))).andReturn(true);
    expect(externalContext.isUserInRole(eq("auditor"))).andReturn(false);
    environment.replay();
    assertTrue(RichFunction.isUserInRole("admin, user, root"));
    Set<String> set = new LinkedHashSet<String>();
    set.add("manager");
    set.add("guest");
    set.add("supervisor");
    assertTrue(RichFunction.isUserInRole(set));
    assertFalse(RichFunction.isUserInRole("auditor"));
    assertFalse(RichFunction.isUserInRole(null));
}