LgoAdapters { static OrderType adaptUserTradeType(LgoUserTrade trade) { boolean bidSide = buyerTaker(trade) || sellerMaker(trade); return bidSide ? OrderType.BID : OrderType.ASK; } private  LgoAdapters(); static ExchangeMetaData adaptMetadata(
      ExchangeMetaData metaData, LgoProducts products, LgoCurrencies currencies); static Stream<LgoKey> adaptKeysIndex(String indexFile); static LgoPlaceOrder adaptLimitOrder(LimitOrder limitOrder); static LgoPlaceOrder adaptEncryptedMarketOrder(MarketOrder marketOrder); static LgoPlaceOrder adaptEncryptedCancelOrder(String orderId, Date date); static LgoUnencryptedOrder adaptUnencryptedLimitOrder(LimitOrder limitOrder); static LgoUnencryptedOrder adaptUnencryptedMarketOrder(MarketOrder marketOrder); static String adaptCurrencyPair(CurrencyPair currencyPair); static UserTrades adaptUserTrades(WithCursor<LgoUserTrades> lastTrades); static OrderBook adaptOrderBook(LgoOrderbook ob, CurrencyPair pair); static LimitOrder adaptEntryToLimitOrder(
      Object[] entry, OrderType bid, CurrencyPair pair); static String adaptDateParam(Date date);  }
@Test public void adaptsTradeType() { assertThat(LgoAdapters.adaptUserTradeType(lgoTrade("B", "T"))).isEqualTo(OrderType.BID); assertThat(LgoAdapters.adaptUserTradeType(lgoTrade("B", "M"))).isEqualTo(OrderType.ASK); assertThat(LgoAdapters.adaptUserTradeType(lgoTrade("S", "T"))).isEqualTo(OrderType.ASK); assertThat(LgoAdapters.adaptUserTradeType(lgoTrade("S", "M"))).isEqualTo(OrderType.BID); }