import junit.framework.TestCase;
public class FieldTest extends TestCase {
public void testGetName() throws Exception {
Field f = null;
f = AbstractField.parse("Subject: Yada yada yada");
assertEquals("Testing simple field", "Subject", f.getName());
f = AbstractField.parse("X-yada-yada: Yada yada yada");
assertEquals("Testing an X- field", "X-yada-yada", f.getName());
try {
f = AbstractField.parse("Yada yada yada");
fail("MimeException not thrown when using an invalid field");
} catch (MimeException e) {