@Test
public void testPutEntity() {

    int code = 404;
    try {
        final String name = "entityOne";
        Entity entity = createEntityObject(name);
        
        // entityName will not match entity.name.
        zms.putEntity(mockDomRsrcCtx, "wrongDomainName", name, auditRef, entity);
        fail("notfounderror not thrown.");
    } catch (ResourceException e) {
        assertEquals(e.getCode(), code);
    }
}