@Test
public void testGetAccess() {

    
    SignedDomain signedDomain = createSignedDomain("coretech", "weather", "storage", true);
    store.processDomain(signedDomain, false);
    
    Principal principal = SimplePrincipal.create("user_domain", "user",
            "v=U1;d=user_domain;n=user;s=signature", 0, null);
    ResourceContext context = createResourceContext(principal);
    
    // user_domain.user only has access to writers
    
    Access access = zts.getAccess(context, "coretech", "writers", "user_domain.user");
    assertTrue(access.getGranted());
    
    access = zts.getAccess(context, "coretech", "readers", "user_domain.user");
    assertFalse(access.getGranted());
    
    // user_domain.user1 had access to readers and writers
    
    access = zts.getAccess(context, "coretech", "writers", "user_domain.user1");
    assertTrue(access.getGranted());
    
    access = zts.getAccess(context, "coretech", "readers", "user_domain.user1");
    assertTrue(access.getGranted());
    
    access = zts.getAccess(context, "coretech", "editors", "user_domain.user1");
    assertFalse(access.getGranted());
    
    // user_domain.user4 only has access to readers
    access = zts.getAccess(context, "coretech", "readers", "user_domain.user4");
    assertTrue(access.getGranted());
    
    access = zts.getAccess(context, "coretech", "writers", "user_domain.user4");
    assertFalse(access.getGranted());
}