function testDontUpdateUnchangedObject()
  {
    $mapper = new AbstractDataMapperMock($this);

    $this->uow->expectOnce('isNew', array($this->object));
    $this->uow->setReturnValue('isNew', false);

    $this->uow->expectOnce('isDirty', array($this->object));
    $this->uow->setReturnValue('isDirty', false);

    $mapper->expectNever('update');
    $mapper->expectNever('insert');

    $mapper->save($this->object);

    $mapper->tally();
  }
  function testSaveUpdate()
  {
    $mapper = new AbstractDataMapperMock($this);

    $mapper->expectOnce('update', array(new IsAExpectation('MockDomainObject')));

    $this->object->expectOnce('getId');
    $this->object->setReturnValue('getId', 10);

    $mapper->save($this->object);

    $mapper->tally();
  }