IbUtils { public static String translateToIbFuturesSymbol(String symbol) { switch (symbol) { case "6C": return "CAD"; case "6E": return "EUR"; case "6J": return "JPY"; case "6S": return "CHF"; case "6B": return "GBP"; case "VX": return "VIX"; default: return symbol; } }  static String translateToIbFuturesSymbol(String symbol); static String getOrderType(TradeOrder.Type orderType); static String getTif(TradeOrder.Duration duration); static String getSecurityType(InstrumentType instrumentType); static String getAction(TradeDirection direction); static QuoteType getQuoteType(int field); static OrderStatus.Status getOrderStatus(String status); static String getExpiryString(int expiryMonth, int expiryYear); static String getExpiryString(int expiryDay, int expiryMonth, int expiryYear); static String getOptionRight( OptionTicker.Right right ); static Image getIconImage(); static BigDecimal getIbMultiplier( Ticker ticker ); static Vector<TagValue> getDefaultTagVector(); static List<TagValue> getDefaultTagList();  }
@Test public void testTranslateFuturesSymbol() { assertEquals("CAD", IbUtils.translateToIbFuturesSymbol("6C")); assertEquals("EUR", IbUtils.translateToIbFuturesSymbol("6E")); assertEquals("JPY", IbUtils.translateToIbFuturesSymbol("6J")); assertEquals("CHF", IbUtils.translateToIbFuturesSymbol("6S")); assertEquals("GBP", IbUtils.translateToIbFuturesSymbol("6B")); assertEquals("VIX", IbUtils.translateToIbFuturesSymbol("VX")); assertEquals("GBP", IbUtils.translateToIbFuturesSymbol("GBP")); }