@Test
public void testVerifyAuthorizedServiceGroupPrefixOperation() {

    // our test resource json includes the following
    // group-prefix use case
    //        "coretech.updater": {
    //            "allowedOperations": [
    //               {
    //                 "name":"putgroupmembership",
    //                  "items": {
    //                      "group-prefix" : [
    //                          "reader.org.",
    //                          "writer.domain."
    //                      ]
    //                  }
    //              }
    //            ]
    zms.verifyAuthorizedServiceGroupOperation(null, "putgroupmembership", "group1");
    // Try passing along operationItem key + value to see if verification works
    zms.verifyAuthorizedServiceGroupOperation("coretech.updater", "putgroupmembership", "reader.org.group1");
    zms.verifyAuthorizedServiceGroupOperation("coretech.updater", "putgroupmembership", "writer.domain.group1");
    // try with restricted operation. Currently, putmembership only allow single operation item.
    zms.verifyAuthorizedServiceGroupOperation("coretech.newsvc", "putgroupmembership", "platforms_deployer");
    zms.verifyAuthorizedServiceGroupOperation("coretech.newsvc", "putgroupmembership", "platforms_different_deployer");
    // Third, try with restriction operation, with not-specified operation item.
    try {
        zms.verifyAuthorizedServiceGroupOperation("coretech.updater", "putgroupmembership", "platforms_deployer_new");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 403);
    }
    try {
        zms.verifyAuthorizedServiceGroupOperation("coretech.updater", "putgroupmembership", "reader.org1.group1");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 403);
    }
    try {
        zms.verifyAuthorizedServiceGroupOperation("coretech.newsvc", "putgroupmembership", "platforms_deployer_new");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 403);
    }
}