}
public void
testWellFormedX509NameTokenizer() {
checkTokenizer(
new X509NameTokenizer("foo"),
new String[] { "foo" }
);
checkTokenizer(
new X509NameTokenizer(" foo "),
new String[] { "foo" }
);
checkTokenizer(
new X509NameTokenizer(" foo, "),
new String[] { "foo", "" }
);
checkTokenizer(
new X509NameTokenizer(" foo\\, "),
new String[] { "foo\\,"}
);
checkTokenizer(
new X509NameTokenizer(" foo\\, bar "),
new String[] { "foo\\, bar"}
);
checkTokenizer(
new X509NameTokenizer(" \"foo,\" "),
new String[] { "\"foo,\""}
);
checkTokenizer(
new X509NameTokenizer("foo, bar"),
new String[] { "foo", "bar"}
);
checkTokenizer(
new X509NameTokenizer("\"foo bar\", gnu gnat"),
new String[] { "\"foo bar\"", "gnu gnat"}
);
checkTokenizer(
new X509NameTokenizer("foo\\ "),
new String[] { "foo\\ "}
);
checkTokenizer(
new X509NameTokenizer("foo\\\\ "),
new String[] { "foo\\\\"}
);
}