HitbtcAdapters { static CurrencyPair guessSymbol(String symbol) { int splitIndex = symbol.endsWith("USDT") ? symbol.lastIndexOf("USDT") : symbol.length() - 3; return new CurrencyPair(symbol.substring(0, splitIndex), symbol.substring(splitIndex)); }  static CurrencyPair adaptSymbol(String symbol); static CurrencyPair adaptSymbol(HitbtcSymbol hitbtcSymbol); static Ticker adaptTicker(HitbtcTicker hitbtcTicker, CurrencyPair currencyPair); static List<Ticker> adaptTickers(Map<String, HitbtcTicker> hitbtcTickers); static OrderBook adaptOrderBook(
      HitbtcOrderBook hitbtcOrderBook, CurrencyPair currencyPair); static OrderType adaptSide(HitbtcSide side); static Trades adaptTrades(
      List<? extends HitbtcTrade> allHitbtcTrades, CurrencyPair currencyPair); static LimitOrder adaptOrder(HitbtcOrder hitbtcOrder); static List<LimitOrder> adaptOrders(List<HitbtcOrder> openOrdersRaw); static OpenOrders adaptOpenOrders(List<HitbtcOrder> openOrdersRaw); static OrderType adaptOrderType(String side); static UserTrades adaptTradeHistory(List<HitbtcOwnTrade> tradeHistoryRaw); static Wallet adaptWallet(String name, List<HitbtcBalance> hitbtcBalances); static String adaptCurrencyPair(CurrencyPair pair); static HitbtcSide getSide(OrderType type); static ExchangeMetaData adaptToExchangeMetaData(
      List<HitbtcSymbol> symbols,
      Map<Currency, CurrencyMetaData> currencies,
      Map<CurrencyPair, CurrencyPairMetaData> currencyPairs); static FundingRecord adapt(HitbtcTransaction transaction);  }
@Test public void testGuessSymbol() { String symbol1 = "LTCUSDT"; String symbol2 = "LTCBTC"; String symbol3 = "USDTBTC"; String symbol4 = "STRATUSDT"; String symbol5 = "STRATBTC"; Assert.assertEquals( new CurrencyPair(Currency.LTC, Currency.USDT), HitbtcAdapters.guessSymbol(symbol1)); Assert.assertEquals(CurrencyPair.LTC_BTC, HitbtcAdapters.guessSymbol(symbol2)); Assert.assertEquals( new CurrencyPair(Currency.USDT, Currency.BTC), HitbtcAdapters.guessSymbol(symbol3)); Assert.assertEquals( new CurrencyPair(Currency.STRAT, Currency.USDT), HitbtcAdapters.guessSymbol(symbol4)); Assert.assertEquals( new CurrencyPair(Currency.STRAT, Currency.BTC), HitbtcAdapters.guessSymbol(symbol5)); }