anchor.diff:      ?assertEqual(5, ?Q:len(Q6)),
       {{value, Msg}, Q7} = ?Q:out(Q6),
       ?assertMatch(<<"t">>, Msg#mqtt_message.topic).
  +
  +infinity_priority_mqueue_test() ->
  +    Opts = [{type, priority},
  +            {priority, [{<<"t1">>, 10}, {<<"t2">>, 8}]},
  +            {max_length, infinity},
  +            {queue_qos0, false}],
  +    Q = ?Q:new("infinity_priority_queue", Opts, alarm_fun()),
  +    ?assertEqual(infinity, ?Q:max_len(Q)),
  +    Qx = lists:foldl(fun(I, AccQ) ->
  +                    AccQ1 =
  +                    ?Q:in(#mqtt_message{topic = <<"t1">>, qos = 1, payload = iolist_to_binary([I])}, AccQ),
  +                    ?Q:in(#mqtt_message{topic = <<"t">>, qos = 1, payload = iolist_to_binary([I])}, AccQ1)
  +            end, Q, lists:seq(1, 255)),
  +    ?assertEqual(510, ?Q:len(Qx)),
  +    ?assertEqual([{len, 510}, {max_len, infinity}, {dropped, 0}], ?Q:stats(Qx)).
    
   alarm_fun() -> fun(_, _) -> alarm_fun() end.
   
  
positive.code:     Q4 = ?Q:in(#mqtt_message{qos = 1, payload = <<"4">>}, Q3),
      ?assertEqual(3, ?Q:len(Q4)),
      {{value, Msg}, Q5} = ?Q:out(Q4),
      ?assertMatch(<<"2">>, Msg#mqtt_message.payload).
  
  priority_mqueue_test() ->
      Opts = [{type, priority},
  
negative.code:             {high_watermark, 0.6},
              {queue_qos0, false}],
      Q = ?Q:new("priority_queue", Opts, alarm_fun()),
      ?assertEqual(priority, ?Q:type(Q)),
      ?assertEqual(3, ?Q:max_len(Q)),
      ?assertEqual(<<"priority_queue">>, ?Q:name(Q)),
  
      ?assert(?Q:is_empty(Q)),
      Q1 = ?Q:in(#mqtt_message{qos = 1, topic = <<"t1">>}, Q),
  