private void assertCompareToken(String token, String... parsedTokens) {
    OracleNetConnectionDescriptorTokenizer tokenizer =
        new OracleNetConnectionDescriptorTokenizer(token);
    tokenizer.parse();

    int index = 0;
    while (true) {
      Token t = tokenizer.nextToken();
      // EOF makes test broken.
      if (t != null && t == OracleNetConnectionDescriptorTokenizer.TOKEN_EOF_OBJECT) {
        return;
      }

      if (t == null) {
        break;
      }
      Assert.assertEquals(t.getToken(), parsedTokens[index++]);
    }
  }
 private void assertTrimRight(String token, String result) {
   OracleNetConnectionDescriptorTokenizer tokenizer =
       new OracleNetConnectionDescriptorTokenizer(token);
   int rightTrimIndex = tokenizer.trimRight(token.length());
   Assert.assertEquals(wrap(result), wrap(token.substring(0, rightTrimIndex)));
 }
 private void AssertParseLiteral(String token, String result) {
   OracleNetConnectionDescriptorTokenizer tokenizer =
       new OracleNetConnectionDescriptorTokenizer(token);
   String literal = tokenizer.parseLiteral();
   Assert.assertEquals(wrap(result), wrap(literal));
 }