@Test
public void testGetRoleTokenUnauthorizedProxy() {

    SignedDomain signedDomain = createSignedDomain("coretech-proxy1", "weather-proxy1", "storage", true);
    store.processDomain(signedDomain, false);
    Principal principal = SimplePrincipal.create("user_domain", "user", "v=U1;d=user_domain;n=user;s=sig", 0, null);
    ResourceContext context = createResourceContext(principal);
    try {
        zts.getRoleToken(context, "coretech-proxy1", null, 600,
                1200, "user_domain.unknown-proxy-user");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 403);
        assertTrue(ex.getMessage().contains("not authorized for proxy role token request"));
    }
}