void (String cmd, boolean handleEscapedWhitespaces, String... tokens) { CommandLineTokenizer tokenizer = new CommandLineTokenizer(cmd, handleEscapedWhitespaces); assertEquals(tokens.length, tokenizer.countTokens()); for (String token : tokens) { assertEquals(token, tokenizer.nextToken()); } }