@Test
public void testExtractRolesMatchingPattern(TestContext context) throws Exception {

    context.assertFalse(roleExtractor.extractRoles(new TestHttpServerRequest(
            buildGroupHeaders("grp_1,grp_2,grp_3,z-gateleen-grp_4"))).isEmpty(), "A non-empty set of roles should have been returned");
    context.assertFalse(roleExtractor.extractRoles(new TestHttpServerRequest(
            buildRoleHeaders("grp_1,grp_2,grp_3,z-gateleen-grp_4"))).isEmpty(), "A non-empty set of roles should have been returned");
    Set<String> groupRoles = roleExtractor.extractRoles(new TestHttpServerRequest(
            buildGroupHeaders("z-gateleen-abc,z-gateleen-xyz,grp_3,z-gateleen-grp_4,gateleen-grp_5")));
    context.assertEquals(3, groupRoles.size());
    context.assertTrue(groupRoles.contains("abc"));
    context.assertTrue(groupRoles.contains("xyz"));
    context.assertTrue(groupRoles.contains("grp_4"));
    context.assertFalse(groupRoles.contains("grp_3"));
    context.assertFalse(groupRoles.contains("gateleen-grp_5"));
    Set<String> roleRoles = roleExtractor.extractRoles(new TestHttpServerRequest(
            buildRoleHeaders("z-gateleen-abc,z-gateleen-xyz,grp_3,z-gateleen-grp_4,gateleen-grp_5")));
    context.assertEquals(3, roleRoles.size());
    context.assertTrue(roleRoles.contains("abc"));
    context.assertTrue(roleRoles.contains("xyz"));
    context.assertTrue(roleRoles.contains("grp_4"));
    context.assertFalse(roleRoles.contains("grp_3"));
    context.assertFalse(roleRoles.contains("gateleen-grp_5"));
}