BittrexUtils { public static CurrencyPair toCurrencyPair(String pairString, boolean apiVersion3) { String[] pairStringSplit = pairString.split(MARKET_NAME_SEPARATOR); if (apiVersion3) { return new CurrencyPair(pairStringSplit[0], pairStringSplit[1]); } return new CurrencyPair(pairStringSplit[1], pairStringSplit[0]); } private  BittrexUtils(); @Deprecated static String toPairString(CurrencyPair currencyPair); static String toPairString(CurrencyPair currencyPair, boolean apiVersion3); static CurrencyPair toCurrencyPair(String pairString, boolean apiVersion3); @Deprecated static CurrencyPair toCurrencyPair(String pairString); static Date toDate(String dateString);  }
@Test public void testToCurrencyPair() { CurrencyPair market = CurrencyPair.ETH_BTC; String marketOldVersionString = "BTC-ETH"; String marketV3ApiString = "ETH-BTC"; Assert.assertEquals(market, toCurrencyPair(marketV3ApiString, true)); Assert.assertEquals(market, toCurrencyPair(marketOldVersionString, false)); }