@Test
public void testGetMimeType() {

    final String SIMPLE_CONTENT_TYPE = "text/html";
    final String NORMAL_CONTENT_TYPE = "text/html; charset=utf-8";
    HttpMessage message = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
    assertNull(HttpUtil.getMimeType(message));
    message.headers().set(HttpHeaderNames.CONTENT_TYPE, "");
    assertNull(HttpUtil.getMimeType(message));
    assertNull(HttpUtil.getMimeType(""));
    message.headers().set(HttpHeaderNames.CONTENT_TYPE, SIMPLE_CONTENT_TYPE);
    assertEquals("text/html", HttpUtil.getMimeType(message));
    assertEquals("text/html", HttpUtil.getMimeType(SIMPLE_CONTENT_TYPE));
    message.headers().set(HttpHeaderNames.CONTENT_TYPE, NORMAL_CONTENT_TYPE);
    assertEquals("text/html", HttpUtil.getMimeType(message));
    assertEquals("text/html", HttpUtil.getMimeType(NORMAL_CONTENT_TYPE));
}