@Test
public void testDeleteEntity() {

    TopLevelDomain dom1 = createTopLevelDomainObject("DelEntityDom1",
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    Entity entity1 = createEntityObject("Entity1");
    zms.putEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity1", auditRef, entity1);
    Entity entity2 = createEntityObject("Entity2");
    zms.putEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity2", auditRef, entity2);
    Entity entityRes = zms.getEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity1");
    assertNotNull(entityRes);
    entityRes = zms.getEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity2");
    assertNotNull(entityRes);
    zms.deleteEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity1", auditRef);
    try {
        zms.getEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity1");
        fail();
    } catch (Exception ex) {
        assertTrue(true);
    }
    entityRes = zms.getEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity2");
    assertNotNull(entityRes);
    zms.deleteEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity2", auditRef);
    try {
        zms.getEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity1");
        fail();
    } catch (Exception ex) {
        assertTrue(true);
    }
    try {
        zms.getEntity(mockDomRsrcCtx, "DelEntityDom1", "Entity2");
        fail();
    } catch (Exception ex) {
        assertTrue(true);
    }
    zms.deleteTopLevelDomain(mockDomRsrcCtx, "DelEntityDom1", auditRef);
}