def bound_to?(exchange, opts = {})
      check_queue_deleted!

      if exchange.respond_to?(:routes_to?)
        # we can do the check ourselves
        exchange.routes_to? self, opts
      else
        # we need the channel to lookup the exchange
        @channel.xchg_routes_to? self, opts.fetch(:routing_key, @name), exchange
      end
    end
def bound_to?(exchange, opts = {})
      check_queue_deleted!

      if exchange.respond_to?(:routes_to?)
        # we can do the check ourselves
        exchange.routes_to? self, opts
      else
        # we need the channel to lookup the exchange
        @channel.xchg_routes_to? self, opts.fetch(:routing_key, @name), exchange
      end
    end
@endgroup

 Check if this queue is bound to the exchange

 @param [BunnyMock::Exchange,String] exchange Exchange to test
 @param [Hash] opts Binding properties

 @option opts [String] :routing_key Routing key from binding

 @return [Boolean] true if this queue is bound to the given exchange, false otherwise
 @api public