code: def test_to_json(mock_exchange_class):
      exchange = mock_exchange_class.return_value
      exchange.options = ExchangeOptions()
      exchange.id = "fake_exchange_id"
      exchange.name = "bitfinex"
      exchange.clock = mock.Mock()
      exchange.clock.step = 0
      exchange.quote_price = mock.Mock(return_value=Decimal(7000.00))
  
      wallets = [
          Wallet(exchange, 10000 * USD),
          Wallet(exchange, 0 * BTC),
      ]
      portfolio = Portfolio(USD, wallets)
  
      order = Order(
          step=0,
          exchange_pair=ExchangePair(exchange, USD / BTC),
          side=TradeSide.BUY,
          trade_type=TradeType.MARKET,
          quantity=5200.00 * USD,
          portfolio=portfolio,
          price=Decimal(7000.00),
      )
  
      d = {
          "id": str(order.id),
          "step": int(order.step),
          "exchange_pair": str(order.exchange_pair),
          "status": str(order.status),
          "type": str(order.type),
          "side": str(order.side),
          "base_symbol": str(order.pair.base.symbol),
          "quote_symbol": str(order.pair.quote.symbol),
          "quantity": str(order.quantity),
          "size": float(order.size),
          "remaining": str(order.remaining),
          "price": float(order.price),
          "criteria": str(order.criteria),
          "path_id": str(order.path_id),
          "created_at": str(order.created_at),
      }
  
      assert order.to_json() == d
  
imports: import re
  import unittest.mock
  from decimal import Decimal
  from tensortrade.oms.instruments import *
  from tensortrade.oms.orders import Order, OrderStatus, OrderSpec, TradeSide, TradeType
  from tensortrade.oms.orders.criteria import Stop
  from tensortrade.oms.exchanges import ExchangeOptions
  from tensortrade.oms.wallets import Wallet, Portfolio
label_desc: Use image node_id 14 for calling a global function with example usage: test_to_json(mock_exchange_class) without return types