public override void SetUp()
        {
            base.SetUp();

            _definition = Configuration.GetTypeDefinition(typeof(Order)).GetRelationEndPointDefinition(typeof(Order).FullName + ".OrderTicket");

            _virtualObjectEndPointMock = MockRepository.GenerateStrictMock <IVirtualObjectEndPoint> ();
            _dataManagerMock           = MockRepository.GenerateStrictMock <IVirtualObjectEndPointDataManager> ();
            _dataManagerMock.Stub(stub => stub.EndPointID).Return(RelationEndPointID.Create(DomainObjectIDs.Order1, _definition));
            _endPointProviderStub     = MockRepository.GenerateStub <IRelationEndPointProvider> ();
            _transactionEventSinkStub = MockRepository.GenerateStub <IClientTransactionEventSink>();

            _loadState = new CompleteVirtualObjectEndPointLoadState(_dataManagerMock, _endPointProviderStub, _transactionEventSinkStub);

            _relatedObject = DomainObjectMother.CreateFakeObject <OrderTicket> (DomainObjectIDs.OrderTicket1);

            _relatedEndPointStub = MockRepository.GenerateStub <IRealObjectEndPoint> ();
            _relatedEndPointStub.Stub(stub => stub.GetDomainObjectReference()).Return(_relatedObject);
            _relatedEndPointStub.Stub(stub => stub.ObjectID).Return(_relatedObject.ID);

            _relatedObject2 = DomainObjectMother.CreateFakeObject <OrderTicket> (DomainObjectIDs.OrderTicket2);

            _relatedEndPointStub2 = MockRepository.GenerateStub <IRealObjectEndPoint> ();
            _relatedEndPointStub2.Stub(stub => stub.ID).Return(RelationEndPointID.Create(_relatedObject2.ID, typeof(OrderTicket), "Order"));
            _relatedEndPointStub2.Stub(stub => stub.GetDomainObjectReference()).Return(_relatedObject2);
            _relatedEndPointStub2.Stub(stub => stub.ObjectID).Return(_relatedObject2.ID);

            _owningObject = DomainObjectMother.CreateFakeObject <Order> ();
        }
        public void GetData()
        {
            _dataManagerMock.Stub(stub => stub.CurrentOppositeObject).Return(_relatedObject);
            _dataManagerMock.Replay();

            var result = _loadState.GetData(_virtualObjectEndPointMock);

            Assert.That(result, Is.SameAs(_relatedObject));
        }