anchor.diff:          machine.fail("test -f ${file}")
   
       # QoS = 0, so only one subscribers should get it
  -    server.execute(
  -        "${sub "-q 0"}"
  -    )
  +    server.execute(subscribe("-q 0"))
   
       # we need to give the subscribers some time to connect
       client2.execute("sleep 5")
  -    client2.succeed(
  -        "${cmd "pub"} -m FOO -q 0"
  -    )
  +    client2.succeed(publish("-m FOO -q 0"))
   
       server.wait_until_succeeds("grep -q FOO ${file}")
       server.execute("rm ${file}")
   
       # QoS = 1, so both subscribers should get it
  -    server.execute(
  -        "${sub "-q 1"}"
  -    )
  -    client1.execute(
  -        "${sub "-q 1"}"
  -    )
  +    server.execute(subscribe("-q 1"))
  +    client1.execute(subscribe("-q 1"))
   
       # we need to give the subscribers some time to connect
       client2.execute("sleep 5")
  -    client2.succeed(
  -        "${cmd "pub"} -m BAR -q 1"
  -    )
  +    client2.succeed(publish("-m BAR -q 1"))
   
  -    server.wait_until_succeeds("grep -q BAR ${file}")
  -    server.execute("rm ${file}")
  -
  -    client1.wait_until_succeeds("grep -q BAR ${file}")
  -    client1.execute("rm ${file}")
  +    for machine in server, client1:
  +        machine.wait_until_succeeds("grep -q BAR ${file}")
  +        machine.execute("rm ${file}")
     '';
   })
  
positive.code: 
    testScript = let
      file = "/tmp/msg";
      sub = args:
        "(${cmd "sub"} -C 1 ${args} | tee ${file} &)";
    in ''
      start_all()
      server.wait_for_unit("mosquitto.service")
  
  
negative.code:   username = "mqtt";
    password = "VERY_secret";
    topic = "test/foo";
  in {
    name = "mosquitto";
    meta = with pkgs.stdenv.lib; {
  