# File test/test_anonymous.rb, line 441
  def test_nack11p_0010
    if @conn.protocol == Stomp::SPL_10
      assert_raise Stomp::Error::UnsupportedProtocolError do
        @conn.nack "dummy msg-id"
      end
    else
      dest = make_destination
      smsg = "test_stomp#test_nack01: #{Time.now.to_f}"
      @conn.publish dest, smsg
      #
      sid = @conn.uuid()
      @conn.subscribe dest, :ack => :client, :id => sid
      msg = @conn.receive
      assert_equal smsg, msg.body
      case @conn.protocol
        when Stomp::SPL_12
          assert_nothing_raised {
            @conn.nack msg.headers["ack"]
            sleep 0.05 # Give racy brokers a chance to handle the last nack before unsubscribe
            @conn.unsubscribe dest, :id => sid
          }
        else # Stomp::SPL_11
          assert_nothing_raised {
            @conn.nack msg.headers["message-id"], :subscription => sid
            sleep 0.05 # Give racy brokers a chance to handle the last nack before unsubscribe
            @conn.unsubscribe dest, :id => sid
          }
      end

      # phase 2
      teardown()
      setup()
      sid = @conn.uuid()
      @conn.subscribe dest, :ack => :auto, :id => sid
      msg2 = @conn.receive
      assert_equal smsg, msg2.body
      checkEmsg(@conn)
    end
  end