@Test
public void testExecutePutServiceIdentityInvalidDomain() {

    TopLevelDomain dom1 = createTopLevelDomainObject("ServiceAddDom1",
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    ServiceIdentity service = createServiceObject("ServiceAddDom1",
            "Service1", "http://localhost", "/usr/bin/java", "root",
            "users", "host1");
    try {
        zms.dbService.executePutServiceIdentity(mockDomRsrcCtx, "ServiceAddDom1Invalid",
                "Service1", service, auditRef, "putServiceIdentity");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 404);
    }
    zms.deleteTopLevelDomain(mockDomRsrcCtx, "ServiceAddDom1", auditRef);
}