DeribitAdapters { public static CurrencyPair adaptCurrencyPair(String instrumentName) { String[] temp = instrumentName.split("-", 2); return new CurrencyPair(temp[0], temp[1]); }  static CurrencyPair adaptCurrencyPair(String instrumentName); static String adaptInstrumentName(CurrencyPair pair, Object[] args); static Ticker adaptTicker(DeribitTicker deribitTicker); static OrderBook adaptOrderBook(DeribitOrderBook deribitOrderBook); static Trade adaptTrade(DeribitTrade deribitTrade); static Trades adaptTrades(DeribitTrades deribitTrades); static ExchangeException adapt(DeribitException ex); static Balance adapt(AccountSummary as);  }
@Test public void adaptCurrencyPair() { String instrumentName = "ETH-22FEB19-140-P"; CurrencyPair pair = DeribitAdapters.adaptCurrencyPair(instrumentName); assertThat(pair).isNotNull(); assertThat(pair.base).isEqualTo(Currency.ETH); assertThat(pair.counter).isEqualTo(new Currency("22FEB19-140-P")); }