### Question:
CompressedHelper { public static String getFileName(String compressedName) { compressedName = compressedName.toLowerCase(); if (isZip(compressedName) || isTar(compressedName) || isRar(compressedName) || is7zip(compressedName) || compressedName.endsWith(fileExtensionGzipTarShort) || compressedName.endsWith(fileExtensionBzip2TarShort)) { return compressedName.substring(0, compressedName.lastIndexOf(".")); } else if (isGzippedTar(compressedName) || isXzippedTar(compressedName) || isLzippedTar(compressedName) || isBzippedTar(compressedName)) { return compressedName.substring(0, Utils.nthToLastCharIndex(2, compressedName, '.')); } else { return compressedName; } }  static Extractor getExtractorInstance(
      @NonNull Context context,
      @NonNull File file,
      @NonNull String outputPath,
      @NonNull Extractor.OnUpdate listener); static Decompressor getCompressorInstance(@NonNull Context context, @NonNull File file); static boolean isFileExtractable(String path); static String getFileName(String compressedName); static final boolean isEntryPathValid(String entryPath); static final char SEPARATOR_CHAR; static final String SEPARATOR; static final String fileExtensionZip; static final String fileExtensionTar; static final String fileExtensionGzipTarLong; static final String fileExtensionBzip2TarLong; static final String fileExtensionRar; static final String fileExtension7zip; static final String fileExtensionLzma; static final String fileExtensionXz; }### Answer:
@Test public void getFileNameTest() throws Exception { assertEquals("test", CompressedHelper.getFileName("test.zip")); assertEquals("test", CompressedHelper.getFileName("test.rar")); assertEquals("test", CompressedHelper.getFileName("test.tar")); assertEquals("test", CompressedHelper.getFileName("test.tar.gz")); assertEquals("test", CompressedHelper.getFileName("test.tgz")); assertEquals("test", CompressedHelper.getFileName("test.tar.bz2")); assertEquals("test", CompressedHelper.getFileName("test.tbz")); assertEquals("test", CompressedHelper.getFileName("test.tar.lzma")); assertEquals("test", CompressedHelper.getFileName("test.jar")); assertEquals("test", CompressedHelper.getFileName("test.apk")); assertEquals("test", CompressedHelper.getFileName("test.7z")); assertEquals("test", CompressedHelper.getFileName("test")); assertEquals("test.z", CompressedHelper.getFileName("test.z")); assertEquals("", CompressedHelper.getFileName("")); }