public void AddOrUpdate(Claim claim)
        {
            var memento = _workspace.GetById<ClaimMemento>(claim.Id.Value);

            if (memento != null)
            {
                claim.GetMemento(memento);
            }
            else
            {
                _workspace.Attach(claim.GetMemento());
            }
        }
        public void FromMemento()
        {
            var id = ClaimId.NewId();
            var expected = new Claim(id);

            var actual = _unitUnderTest.FromMemento(expected.GetMemento());

            Assert.AreEqual(expected, actual);
        }
        public Claim GetById(ClaimId id)
        {
            var memento = _workspace.GetById<ClaimMemento>(id.Value);
            var claim = _claimFactory.FromMemento(memento);

            if (claim == null)
            {
                claim = new Claim(id);
                _workspace.Attach(claim.GetMemento());
            }
            return claim;
        }