Util { public static String parseTicker(String ticker) { if( ticker.indexOf(".") != -1 ) { ticker = ticker.substring(0, ticker.indexOf(".")); } if( ticker.startsWith("0") ) { return parseTicker(ticker.substring(1)); } else { return ticker; } }  static int roundLot( int size, int minimumSize); static String parseTicker(String ticker);  }
@Test public void testParseTicker() { assertEquals("700", Util.parseTicker("00700")); assertEquals("700", Util.parseTicker("700")); assertEquals("700", Util.parseTicker("00700.HK")); assertEquals("701", Util.parseTicker("00701.SG")); assertEquals("QQQ", Util.parseTicker("QQQ")); }