@Test
public void testGetAccessInvalidData() {

    
    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);
    
    // null and empty arguments
    
    try {
        zts.getAccess(context, "", "writers", "user_domain.user");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    
    try {
        zts.getAccess(context, null, "writers", "user_domain.user");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    
    try {
        zts.getAccess(context, "coretech", "", "user_domain.user");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    
    try {
        zts.getAccess(context, "coretech", null, "user_domain.user");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    
    try {
        zts.getAccess(context, "coretech", "writers", "");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    
    try {
        zts.getAccess(context, "coretech", "writers", null);
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    
    // now invalid domain
    
    try {
        zts.getAccess(context, "coretech-unknown", "writers", "user_domain.user");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 404);
    }
}