CryptowatchAdapters { public static OrderBook adaptToOrderbook(CryptowatchOrderBook book, CurrencyPair currencyPair) { List<LimitOrder> askOrders = book.getAsks().stream() .map( order -> new LimitOrder( Order.OrderType.ASK, order.getVolume(), currencyPair, "", null, order.getPrice())) .collect(Collectors.toList()); List<LimitOrder> bidOrders = book.getBids().stream() .map( order -> new LimitOrder( Order.OrderType.BID, order.getVolume(), currencyPair, "", null, order.getPrice())) .collect(Collectors.toList()); return new OrderBook(new Date(), askOrders, bidOrders); }  static ExchangeMetaData adaptToExchangeMetaData(
      ExchangeMetaData exchangeMetaData,
      List<CryptowatchAssetPair> assetPairs,
      List<CryptowatchAsset> assets); static CurrencyPair adaptToCurrencyPair(CryptowatchAssetPair pair); static OrderBook adaptToOrderbook(CryptowatchOrderBook book, CurrencyPair currencyPair); static Trades adaptToTrades(
      List<CryptowatchTrade> cryptowatchTrades, CurrencyPair currencyPair); static String adaptCurrencyPair(CurrencyPair pair);  }
@Test public void adaptToOrderbook() throws IOException { CryptowatchOrderBook cryptowatchOrderBook = TestUtils.getObject( "/org/knowm/xchange/cryptowatch/marketdata/example-orderbook-results.json", CryptowatchOrderBookResult.class) .getResult(); OrderBook orderBook = CryptowatchAdapters.adaptToOrderbook(cryptowatchOrderBook, CurrencyPair.BTC_EUR); assertNotNull(orderBook); }