### Question:
Mimetypes { public void registerMimetype(String extension, String mimetype) { extensionToMimetypeMap.put(StringUtils.lowerCase(extension), mimetype); } @SuppressWarnings("checkstyle:methodlength")  Mimetypes(); static synchronized Mimetypes getInstance(); void loadAndReplaceMimetypes(InputStream is); String getMimetype(String fileName); String getMimetype(File file); void registerMimetype(String extension, String mimetype); static final String MIMETYPE_XML; static final String MIMETYPE_HTML; static final String MIMETYPE_OCTET_STREAM; static final String MIMETYPE_GZIP; }### Answer:
@Test public void testRegisterMimetype() { Mimetypes mt = new Mimetypes(); String mimetype = "text/foo"; mt.registerMimetype("foo", mimetype); assertEquals("new mimetype", mimetype, mt.getMimetype("file.foo")); }