/**
   * Verify if the objects match completely through allowing the session to use the descriptors.
   * This will compare the objects and all of their privately owned parts.
   */
  protected void verify() {
    if (!(compareObjects(this.unitOfWorkWorkingCopy, this.objectToBeWritten))) {
      throw new TestErrorException(
          "The object in the unit of work has not been commited properly to its parent");
    }

    super.verify();
  }
  protected void setup() {
    super.setup();

    // Acquire first unit of work
    this.unitOfWork = getSession().acquireUnitOfWork();
    this.nestedUnitOfWork = unitOfWork.acquireUnitOfWork();

    this.unitOfWorkWorkingCopy = (Employee) this.unitOfWork.registerObject(this.objectToBeWritten);
    this.nestedUnitOfWorkWorkingCopy =
        (Employee) this.nestedUnitOfWork.registerObject(this.unitOfWorkWorkingCopy);
  }
  protected void setup() {
    super.setup();

    // Acquire first unit of work
    this.unitOfWork = getSession().acquireUnitOfWork();

    this.unitOfWorkWorkingCopy = this.unitOfWork.registerObject(this.objectToBeWritten);
    changeUnitOfWorkWorkingCopy();
    // Use the original session for comparision
    if (!compareObjects(this.originalObject, this.objectToBeWritten)) {
      throw new TestErrorException("The original object was changed through changing the clone.");
    }
  }