public void test() { UnitOfWork uow = getSession().acquireUnitOfWork(); this.emp = Employee.example1(); this.emp.asset1.asset = Vehicle.example1(); uow.registerObject(this.emp); uow.commit(); uow = getSession().acquireUnitOfWork(); Employee empClone = (Employee) uow.registerObject(this.emp); Employee newClone = (Employee) empClone.clone(); ((Vehicle) newClone.asset1.asset).make = "Beamer"; uow.deepMergeClone(newClone); uow.commit(); if (!((AbstractSession) getSession()).compareObjects(newClone, this.emp)) { throw new TestErrorException("Failed to merge the Variable 1 to 1 properly"); } }