### Question:
MediaMetaDataUtils { public static final ContentType classifyUrl(final String path) { try { final String type = MediaChecker.getMimeType(path); if (type.startsWith("image")) { return ContentType.IMAGE; } if (type.startsWith("audio")) { return ContentType.AUDIO; } if (type.startsWith("video")) { return ContentType.VIDEO; } if (type.equals("application/pdf")) { return ContentType.PDF; } if ((type.startsWith("text") || type.equals("application/xml") || type.equals("application/rtf") || type.equals("application/epub")) && !type.contains("html")) { return ContentType.NON_PDF_TEXT; } return ContentType.UNKNOWN; } catch (IOException e) { return ContentType.UNKNOWN; } }  static final ContentType classifyUrl(final String path); final static ImageMetaInfo extractImageMetadata(final String path, final String colorMapPath); final static AudioMetaInfo extractAudioMetadata(final String path); final static VideoMetaInfo extractVideoMetaData(final String path); final static TextMetaInfo extractTextMetaData(final String path);  }### Answer:
@Test public void test_ContentTypeDetection_ImgJpeg() { assertEquals(ContentType.IMAGE, MediaMetaDataUtils.classifyUrl(getPath(Image1))); assertEquals (ContentType.IMAGE, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "image2.jpeg")); }
@Test public void test_ContentTypeDetection_TextPDF() { assertEquals (ContentType.PDF, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "text1.pdf")); assertEquals (ContentType.PDF, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "text2.pdf")); assertEquals (ContentType.PDF, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "text3.pdf")); assertEquals (ContentType.PDF, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "text4.pdf")); }
@Test public void test_ContentTypeDetection_TextPlain() { assertEquals (ContentType.NON_PDF_TEXT, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "text1")); }
@Test public void test_ContentTypeDetection_AudioMp3() { assertEquals (ContentType.AUDIO, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "audio1.mp3")); assertEquals (ContentType.AUDIO, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "audio2.mp3")); }
@Test public void test_ContentTypeDetection_VideoMpg() { assertEquals (ContentType.VIDEO, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "video1.mpg")); assertEquals (ContentType.VIDEO, MediaMetaDataUtils.classifyUrl(PATH_PREFIX + "video2.mpg")); }
@Test public void test_ContentTypeDetection_Unknown() { assertEquals(ContentType.UNKNOWN, MediaMetaDataUtils.classifyUrl("http: }