anchor.diff:  let mutable setProxyingAndDeferredLoading = true
   
   let setupPersistorForTesting (p : EntityObjectStore) = 
  -    p.SetupForTesting(new MockInjector(),
  +    p.SetupForTesting(testInjector,
                         EntityObjectStore.CreateAdapterDelegate(AdapterForTest),
                         EntityObjectStore.ReplacePocoDelegate(ReplacePocoForTest), 
                         EntityObjectStore.RemoveAdapterDelegate(RemoveAdapterForTest), 
  
positive.code:  
  let NotifyUIForTest (nakedObject : INakedObject) = ()
  
  let loadSpecificationHandler (t : Type) : INakedObjectSpecification  = upcast new MockNakedObjectSpecification()
  
  let mutable updatedCount = 0
  let mutable updatingCount = 0
  
negative.code: ﻿// Copyright © Naked Objects Group Ltd ( http://www.nakedobjects.net). 
  // All Rights Reserved. This code released under the terms of the 
  // Microsoft Public License (MS-PL) ( http://opensource.org/licenses/ms-pl.html) 
  
  module NakedObjects.TestTypes
  
  open NUnit.Framework
  open NakedObjects.EntityObjectStore
  open NakedObjects.Architecture.Component
  open NakedObjects.Architecture.Spec
  open NakedObjects.Architecture.Resolve
  open System
  open NakedObjects.Architecture.Adapter
  open System.Collections.Generic
  open System.Reflection
  open NakedObjects.Architecture.Facets
  open NakedObjects.Architecture.Security
  open NakedObjects.Core.Reflect
  open Moq;
  
  let injectedObjects = new List<Object>()
  
  let mockInjector = new Mock<IContainerInjector>()
  let testInjector = mockInjector.Object
  mockInjector.Setup(fun x -> x.InitDomainObject(It.IsAny<obj>())).Callback<obj>(fun o -> injectedObjects.Add o) |> ignore
  
  let mockNakedObjectSpecification = new Mock<INakedObjectSpecification>()
  let testNakedObjectSpecification = mockNakedObjectSpecification.Object
  
  mockNakedObjectSpecification.Setup(fun x -> x.ContainsFacet()).Returns(false) |> ignore
  mockNakedObjectSpecification.Setup(fun x -> x.ContainsFacet(null)).Returns(false) |> ignore
  
  mockNakedObjectSpecification.Setup(fun x -> x.AddFacet(It.IsAny<IFacet>())).Callback<IFacet>(fun f -> Assert.IsInstanceOf<Objects.Aggregated.IComplexTypeFacet>(f)) |> ignore
  
  let mockMetamodelManager = new Mock<IMetamodelManager>()
  
  let objects = new Dictionary<Object, INakedObject>()
      
  let AddAdapter (ob : obj)  oid =
  
      let mockNakedObject = new Mock<INakedObject>()
      let testNakedObject = mockNakedObject.Object
      let  dobj = ob
      let  eoid : IOid  = if oid = null then ((box (new EntityOid(mockMetamodelManager.Object, ob.GetType(), [|box 0|], true))) :?> IOid) else oid
      let  rsm = new ResolveStateMachine(testNakedObject, null)
  
      mockNakedObject.Setup(fun no -> no.Object).Returns(dobj) |> ignore
      mockNakedObject.Setup(fun no -> no.Oid).Returns(eoid) |> ignore
      mockNakedObject.Setup(fun no -> no.ResolveState).Returns(rsm) |> ignore
  
      match oid with 
      | null ->  testNakedObject.ResolveState.Handle Events.InitializeTransientEvent
      | _ -> testNakedObject.ResolveState.Handle Events.InitializePersistentEvent      
      objects.Add(ob, testNakedObject)
      testNakedObject
   
  let GetOrAddAdapterForTest obj  oid =
      if objects.ContainsKey(obj) then
  