### Question:
MimeTypeParser { public static boolean isToken (@Nullable final String sToken) { if (StringHelper.hasNoText (sToken)) return false; final char [] aChars = sToken.toCharArray (); for (final char c : aChars) if (!isTokenChar (c)) return false; return true; } private  MimeTypeParser(); @Nonnull @ReturnsMutableCopy static char [] getAllTSpecialChars(); static boolean isTSpecialChar(final char c); static boolean isTokenChar(final char c); static boolean isToken(@Nullable final String sToken); @Nullable static MimeType parseMimeType(@Nullable final String sMimeType); @Nullable static MimeType parseMimeType(@Nullable final String sMimeType, @Nonnull final EMimeQuoting eQuotingAlgorithm); @Nullable static MimeType safeParseMimeType(@Nullable final String sMimeType); @Nullable static MimeType safeParseMimeType(@Nullable final String sMimeType, @Nonnull final EMimeQuoting eQuotingAlgorithm);  }### Answer:
@Test public void testIsToken () { assertFalse (MimeTypeParser.isToken (null)); assertFalse (MimeTypeParser.isToken ("")); assertFalse (MimeTypeParser.isToken (" ")); assertFalse (MimeTypeParser.isToken (" any")); assertFalse (MimeTypeParser.isToken ("any ")); assertFalse (MimeTypeParser.isToken ("charset=")); assertTrue (MimeTypeParser.isToken ("a")); assertTrue (MimeTypeParser.isToken ("param")); assertTrue (MimeTypeParser.isToken ("param1")); assertTrue (MimeTypeParser.isToken ("charset")); }