@Test
public void testExecutePutPolicyInvalidDomain() {

    TopLevelDomain dom1 = createTopLevelDomainObject("PolicyAddDom1",
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    Policy policy1 = createPolicyObject("PolicyAddDom1", "Policy1");
    
    try {
        zms.dbService.executePutPolicy(mockDomRsrcCtx, "PolicyAddDom1Invalid", "Policy1",
                policy1, auditRef, "putPolicy");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 404);
    }
    zms.deleteTopLevelDomain(mockDomRsrcCtx, "PolicyAddDom1", auditRef);
}