@Test
public void testExtension() throws MimeTypeException {

    MimeType doc = types.forName("application/vnd.ms-word");
    patterns.add("*.doc", doc);
    assertEquals(".doc", doc.getExtension());
}