UCIProtocol { final String[] tokenize(String cmdLine) { cmdLine = cmdLine.trim(); return cmdLine.split("\\s+"); } UCIProtocol(); static void main(boolean autoStart);  }
@Test public void testTokenize() { System.out.println("tokenize"); UCIProtocol uci = new UCIProtocol(); String[] result = uci.tokenize(" a b c de \t \t fgh"); assertEquals(5, result.length); assertEquals("a", result[0]); assertEquals("b", result[1]); assertEquals("c", result[2]); assertEquals("de", result[3]); assertEquals("fgh", result[4]); }