}
@Test
public void parse_with_parameters() throws Exception
{
ContentType contentType = new ContentType("text/html;charset=utf-8");
assertEquals(contentType.getBaseType(), "text");
assertEquals(contentType.getSubType(), "html");
assertEquals(contentType.getMimeType(), "text/html");
List<String> parameterNames = contentType.getParameterNames();
assertEquals(parameterNames.size(), 1);
assertEquals(parameterNames.get(0), "charset");
assertEquals(contentType.getCharset(), "utf-8");
assertTrue(contentType.hasParameters());
String nonexistant = contentType.getParameter("nonexistant");
assertTrue(nonexistant == null);
}