@Test
public void testExtractHTTPHeaderContentType()
        throws Exception
{

    String httpHeaders = "HTTP/1.1 200 OK\n" + "Date: Sun, 05 Jul 2015 17:30:02 GMT\n"
            + "Server: Apache/2.2.29 (Unix) FrontPage/5.0.2.2635\n"
            + "X-Powered-By: PHP/5.3.29-pl0-gentoo\n"
            + "X-Pingback: http://0351de3.netsolhost.com/WordPress/xmlrpc.php\n"
            + "Link: <http://0351de3.netsolhost.com/WordPress/?p=8261>; rel=shortlink\n"
            + "Connection: close\n" + "Content-Type: text/html; charset=UTF-8\n";

    assertEquals("text/html", WARCRecord.extractHTTPHeaderContentType(httpHeaders));

    httpHeaders = "HTTP/1.1 200 OK\n" + "Date: Sun, 05 Jul 2015 17:30:02 GMT\n"
            + "Content-Type: application/xhtml+xml\n"
            + "Server: Apache/2.2.29 (Unix) FrontPage/5.0.2.2635\n";

    assertEquals("application/xhtml+xml", WARCRecord.extractHTTPHeaderContentType(httpHeaders));

    httpHeaders = "HTTP/1.1 200 OK\n" + "Date: Sun, 05 Jul 2015 17:30:02 GMT\n"
            + "Content-Type: application/wordperfect5.1;\n"
            + "Server: Apache/2.2.29 (Unix) FrontPage/5.0.2.2635\n";

    assertEquals("application/wordperfect5.1",
            WARCRecord.extractHTTPHeaderContentType(httpHeaders));

}