* Test method for {@link org.naturalcli.Token#isOptional()}.
*/
@Test
public final void testSetText() throws InvalidTokenException {
// ok
new Token("marian");
new Token("<marian>");
new Token("[marian]");
new Token("[<marian>]");
// not ok
try { new Token("marian]"); fail(); } catch (InvalidTokenException e) { }
try { new Token("marian>"); fail(); } catch (InvalidTokenException e) { }
try { new Token("marian>]"); fail(); } catch (InvalidTokenException e) { }
try { new Token("<marian"); fail(); } catch (InvalidTokenException e) { }
try { new Token("<marian]"); fail(); } catch (InvalidTokenException e) { }
try { new Token("<marian>]"); fail(); } catch (InvalidTokenException e) { }
try { new Token("<[marian"); fail(); } catch (InvalidTokenException e) { }
try { new Token("<[marian>"); fail(); } catch (InvalidTokenException e) { }
try { new Token("<[marian>]"); fail(); } catch (InvalidTokenException e) { }
try { new Token("[marian"); fail(); } catch (InvalidTokenException e) { }
try { new Token("[marian>"); fail(); } catch (InvalidTokenException e) { }
try { new Token("[marian>]"); fail(); } catch (InvalidTokenException e) { }
try { new Token(""); fail(); } catch (InvalidTokenException e) { }
try { new Token(null); fail(); } catch (InvalidTokenException e) { }
}