anchor.diff:  
       let (messages : string list) = accumulator <? Query |> Async.RunSynchronously
       Assert.AreEqual(["Hi!"], messages)
  -    system.Terminate() |> Async.AwaitTask |> Async.RunSynchronously
  +    stopSystem system
   
   [<Test>]
   let ``Pub/sub``() = 
  -    let system = System.create "system" <| Configuration.load ()
  -    let queuefactory = spawn system "queues" (queueFactoryActor {Hostname="localhost";Username="guest";Password="guest"})
  -    let accumulator1 = spawn system "accumulator1" accumulatorActor
  -    let subscriber1 = spawn system "subscriber1" (queueReaderActor<string> id accumulator1)
  -    let accumulator2 = spawn system "accumulator2" accumulatorActor
  -    let subscriber2 = spawn system "subscriber2" (queueReaderActor<string> id accumulator2)
  -    let exchangeParams = { QueueName = ""; ExchangeName = "logs"; ExchangeType = Fanout; Durable = false; Arguments = null }
  -    let (exchange : IActorRef) = queuefactory <? CreateExchange ("publisher", exchangeParams, true) |> Async.RunSynchronously
  -    let queueParams = { QueueName = "logs1"; ExchangeName = "logs"; ExchangeType = Direct; Durable = false; Arguments = null }
  -    let (queue1 : IActorRef) = queuefactory <? CreateExchange ("subscriber1", queueParams, true) |> Async.RunSynchronously
  -    let queueParams = { QueueName = "logs2"; ExchangeName = "logs"; ExchangeType = Direct; Durable = false; Arguments = null }
  -    let (queue2 : IActorRef) = queuefactory <? CreateExchange ("subscriber2", queueParams, true) |> Async.RunSynchronously
  +    let (system, queueFactory) = startSystem ()
  +    let exchange = createFanoutExchange queueFactory "logs"
  +    let queue1 = createDirectQueue queueFactory "logs1" "logs"
  +    let queue2 = createDirectQueue queueFactory "logs2" "logs"
  +
  +    let (subscriber1, accumulator1) = createSubscriber system "subscriber1"
  +    let (subscriber2, accumulator2) = createSubscriber system "subscriber2"
   
       exchange <! Connect
       queue1 <! Connect
  
positive.code: 
  let wait numberOfSeconds = System.Threading.Thread.Sleep(numberOfSeconds * 1000)
  
  [<Test>]
  let ``Work queue``() = 
      let system = System.create "system" <| Configuration.load ()
      let queuefactory = spawn system "queues" (queueFactoryActor {Hostname="localhost";Username="guest";Password="guest"})
      let accumulator = spawn system "accumulator" accumulatorActor
      let subscriber = spawn system "subscriber" (queueReaderActor<string> id accumulator)
      let queueParams = { QueueName = "hello"; ExchangeName = ""; ExchangeType = Direct; Durable = false; Arguments = null }
      let (queue : IActorRef) = queuefactory <? CreateExchange ("work", queueParams, false) |> Async.RunSynchronously
  
      queue <! Connect
      queue <! Subscribe subscriber
  
negative.code:     Assert.AreEqual(["Hi 2!"; "Hi 1!"], messages)
      let (messages : string list) = accumulator2 <? Query |> Async.RunSynchronously
      Assert.AreEqual(["Hi 2!"; "Hi 1!"], messages)
      stopSystem system
  