### Question:
ContentTypeUtils { public static String[] splitContentTypeListString(String contentTypeListString) { String[] splittedArray = StringUtils.splitShortString(contentTypeListString, ','); for (int i = 0; i < splittedArray.length; i++) { int semicolonIndex = splittedArray[i].indexOf(';'); if (semicolonIndex != -1) { splittedArray[i] = splittedArray[i].substring(0,semicolonIndex); } } return splittedArray; }  static boolean containsContentType(String contentType, String[] allowedContentTypes); static String chooseWriterContentType(String contentTypeListString, 
            String[] htmlContentTypes, String[] xhtmlContentTypes); static String[] splitContentTypeListString(String contentTypeListString); static String getContentTypeFromAcceptHeader(FacesContext context); static String[] getSupportedContentTypes(); static boolean isXHTMLContentType(String contentType); static final String HTML_CONTENT_TYPE; static final String TEXT_ANY_CONTENT_TYPE; static final String ANY_CONTENT_TYPE; static final String[] HTML_ALLOWED_CONTENT_TYPES; static final String XHTML_CONTENT_TYPE; static final String APPLICATION_XML_CONTENT_TYPE; static final String TEXT_XML_CONTENT_TYPE; static final String[] XHTML_ALLOWED_CONTENT_TYPES; static final String[] AJAX_XHTML_ALLOWED_CONTENT_TYPES; static final String DEFAULT_CHAR_ENCODING; }### Answer:
@Test public void testSplitContentTypeListString() throws Exception { String [] splittedArray = ContentTypeUtils.splitContentTypeListString("text/*, text/html "); Assert.assertTrue(ContentTypeUtils.containsContentType( ContentTypeUtils.HTML_CONTENT_TYPE, splittedArray)); Assert.assertTrue(ContentTypeUtils.containsContentType( ContentTypeUtils.TEXT_ANY_CONTENT_TYPE, splittedArray)); splittedArray = ContentTypeUtils.splitContentTypeListString(" text/x-dvi; q=.8; mxb=100000; mxt=5.0, text/x-c"); Assert.assertTrue(ContentTypeUtils.containsContentType( "text/x-dvi", splittedArray)); Assert.assertTrue(ContentTypeUtils.containsContentType( "text/x-c", splittedArray)); }