TradingUtils { public static String[] splitCcyPair(String instrument, String currencySeparator) { return StringUtils.split(instrument, currencySeparator); } private  TradingUtils(); static final String executingRequestMsg(HttpRequest request); static long toUnixTime(DateTime dateTime); static long toMillisFromNanos(long nanos); static String[] splitCcyPair(String instrument, String currencySeparator); static double calculateTakeProfitPrice(double tickSize, TradingSignal signal, double bidPrice,
			double askPrice, int pipsDesired); static final String responseToString(HttpResponse response); static final boolean isEmpty(Collection<?> collection); static final boolean isEmpty(Map<?, ?> map); static String[] splitInstrumentPair(String instrument); static final int getSign(String currencyInstrument, TradingSignal side, String currency); static void closeSilently(CloseableHttpClient httpClient); static void printErrorMsg(HttpResponse response); static String getResponse(HttpResponse response); static final int CCY_PAIR_LEN; static final int CCY_SEP_CHR_POS; }
@Test public void splitCcyPairTest() { String currencies[] = TradingUtils.splitCcyPair("EUR_GBP", TradingConstants.CURRENCY_PAIR_SEP_UNDERSCORE); assertEquals(2, currencies.length); assertEquals("EUR", currencies[0]); assertEquals("GBP", currencies[1]); currencies = TradingUtils.splitCcyPair("EUR_CHF", TradingConstants.FWD_SLASH); assertEquals(1, currencies.length); assertEquals("EUR_CHF", currencies[0]); }