@Test
public void testGetUserTokenAuthorizedService() {

    
    Authority userAuthority = new com.yahoo.athenz.common.server.debug.DebugUserAuthority();
    
    String userId = "george";
    Principal principal = SimplePrincipal.create("user", userId, userId + ":password",
            0, userAuthority);
    assertNotNull(principal);
    ((SimplePrincipal) principal).setUnsignedCreds(userId);
    ResourceContext rsrcCtx1 = createResourceContext(principal);
    
    zms.privateKey = new ServerPrivateKey(Crypto.loadPrivateKey(Crypto.ybase64DecodeString(privKey)), "0");
    
    UserToken token = zms.getUserToken(rsrcCtx1, userId, "coretech.storage", null);
    assertNotNull(token);
    assertTrue(token.getToken().contains(";b=coretech.storage;"));
    
    token = zms.getUserToken(rsrcCtx1, userId, "coretech.storage,sports.hockey", false);
    assertNotNull(token);
    assertTrue(token.getToken().contains(";b=coretech.storage,sports.hockey;"));
}