anchor.diff:      ?_assertEqual(ok, gen_tcp:close(Socket)).
   
   publish_b2c_disconnect_qos1(_) ->
  -    Connect = packet:gen_connect("pub-qos1-disco-test", [{keepalive,60}, {clean_session, false}]),
  +    Connect = packet:gen_connect("pub-qos1-disco-test",
  +                                 [{keepalive, 60}, {clean_session, false}]),
       Connack = packet:gen_connack(0),
       Subscribe = packet:gen_subscribe(3265, "qos1/disconnect/test", 1),
       Suback = packet:gen_suback(3265, 1),
  -    Publish = packet:gen_publish("qos1/disconnect/test", 1, <<"disconnect-message">>, [{mid, 1}]),
  -    PublishDup = packet:gen_publish("qos1/disconnect/test", 1, <<"disconnect-message">>, [{mid, 1}, {dup, true}]),
  +    Publish = packet:gen_publish("qos1/disconnect/test", 1,
  +                                 <<"disconnect-message">>, [{mid, 1}]),
  +    PublishDup = packet:gen_publish("qos1/disconnect/test", 1,
  +                                    <<"disconnect-message">>,
  +                                    [{mid, 1}, {dup, true}]),
       Puback = packet:gen_puback(1),
  -    Publish2 = packet:gen_publish("qos1/outgoing", 1, <<"outgoing-message">>, [{mid, 3266}]),
  +    Publish2 = packet:gen_publish("qos1/outgoing", 1,
  +                                  <<"outgoing-message">>, [{mid, 3266}]),
       enable_on_publish(),
       enable_on_subscribe(),
       {ok, Socket} = packet:do_client_connect(Connect, Connack, []),
  
positive.code: -module(vmq_publish_tests).
  -include_lib("eunit/include/eunit.hrl").
  
  -define(setup(F), {setup, fun setup/0, fun teardown/1, F}).
  -define(listener(Port), {{{127,0,0,1}, Port}, [{max_connections, infinity},
                                                 {nr_of_acceptors, 10},
                                                 {mountpoint, ""}]}).
  -export([hook_auth_on_subscribe/3,
           hook_auth_on_publish/6]).
  
  
negative.code:     ?_assertEqual(ok, gen_tcp:close(Socket)).
  
  publish_c2b_disconnect_qos2(_) ->
      Connect = packet:gen_connect("pub-qos2-disco-test",
                                   [{keepalive, 60}, {clean_session, false}]),
      Connack = packet:gen_connack(0),
      Publish = packet:gen_publish("qos2/disconnect/test", 2,
                                   <<"disconnect-message">>, [{mid, 1}]),
      PublishDup = packet:gen_publish("qos2/disconnect/test", 2,
                                      <<"disconnect-message">>,
                                      [{mid, 1}, {dup, true}]),
      Pubrec = packet:gen_pubrec(1),
      Pubrel = packet:gen_pubrel(1),
      PubrelDup = packet:gen_pubrel(1, true),
  