f = (ContentTypeField) Field.parse("Content-Type: text/html;");
assertEquals("text/html", f.getMimeType());
}
public void testGetMimeType() throws Exception {
ContentTypeField f = null;
f = (ContentTypeField) Field.parse("Content-Type: text/PLAIN");
assertEquals("text/plain", f.getMimeType());
f = (ContentTypeField) Field.parse("content-type: TeXt / html ");
assertEquals("text/html", f.getMimeType());
f = (ContentTypeField) Field.parse("CONTENT-TYPE: x-app/yada ;"
+ " param = yada");
assertEquals("x-app/yada", f.getMimeType());
f = (ContentTypeField) Field.parse("CONTENT-TYPE: yada");
assertEquals("", f.getMimeType());
}