CtpSymbolNameConverter { public static String convert(String symbol) { String symbolName = symbol.replaceAll("\\d+", ""); String symbolMonth = symbol.replace(symbolName, ""); symbolName = symbolName.toUpperCase(); if(!keyMap.containsKey(symbolName)) { return symbol; } symbolMonth = symbolMonth.length() == 3 ? "2" + symbolMonth : symbolMonth; return keyMap.get(symbolName) + symbolMonth; } private  CtpSymbolNameConverter(); static String convert(String symbol);  }
@Test(dataProvider = "dp") public void f(String n, String s) { assertThat(CtpSymbolNameConverter.convert(n)).isEqualTo(s); }