### Question:
Icons { public static int getTypeOfFile(String path, boolean isDirectory) { String mimeType = MimeTypes.getMimeType(path, isDirectory); if (mimeType == null) return NOT_KNOWN; Integer type = sMimeIconIds.get(mimeType); if (type != null) return type; else { if (checkType(mimeType, "text")) return TEXT; else if (checkType(mimeType, "image")) return IMAGE; else if (checkType(mimeType, "video")) return VIDEO; else if (checkType(mimeType, "audio")) return AUDIO; else if (checkType(mimeType, "crypt")) return ENCRYPTED; else return NOT_KNOWN; } }  static @DrawableRes int loadMimeIcon(String path, boolean isDirectory); static int getTypeOfFile(String path, boolean isDirectory); static final int NOT_KNOWN; static final int APK; }### Answer:
@Test public void testReturnArchiveTypes() { assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.zip", false)); assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.rar", false)); assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.tar", false)); assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.tar.gz", false)); assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.tar.lzma", false)); assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.tar.xz", false)); assertEquals(Icons.COMPRESSED, Icons.getTypeOfFile("archive.tar.bz2", false)); }