MimeTypes { public static String getMimeTypeForExtension(String fileExtension) { return MIME_MAP.get(fileExtension.toLowerCase()); } private  MimeTypes(); static String getMimeTypeForExtension(String fileExtension); static String getMimeTypeForFileName(String fileName); static String getDefaultMimeType();  }
@Test public void testCompleteness() { try { assertNotNull(MimeTypes.getMimeTypeForExtension("txt")); assertNotNull(MimeTypes.getMimeTypeForExtension("htm")); assertNotNull(MimeTypes.getMimeTypeForExtension("html")); assertNotNull(MimeTypes.getMimeTypeForExtension("css")); assertNotNull(MimeTypes.getMimeTypeForExtension("js")); assertNotNull(MimeTypes.getMimeTypeForExtension("json")); assertNotNull(MimeTypes.getMimeTypeForExtension("png")); assertNotNull(MimeTypes.getMimeTypeForExtension("jpg")); assertNotNull(MimeTypes.getMimeTypeForExtension("jpeg")); assertNotNull(MimeTypes.getMimeTypeForExtension("gif")); assertNotNull(MimeTypes.getMimeTypeForExtension("woff")); assertNotNull(MimeTypes.getMimeTypeForExtension("woff2")); assertNotNull(MimeTypes.getMimeTypeForExtension("otf")); assertNotNull(MimeTypes.getMimeTypeForExtension("ttf")); assertNotNull(MimeTypes.getMimeTypeForExtension("eot")); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }