@Test
    public void testExtractTgz() throws Exception {
        //TIKA-2564

        String[] params = {"--extract-dir=" + extractDir.toAbsolutePath(), "-z", resourcePrefix + "/test-documents.tgz"};

        TikaCLI.main(params);

        String[] tempFileNames = extractDir
                .toFile()
                .list();
        assertNotNull(tempFileNames);
        String allFiles = String.join(" : ", tempFileNames);

        Path expectedTAR = extractDir.resolve("test-documents.tar");

        assertExtracted(expectedTAR, allFiles);
    }
Tests --list-supported-types option of the cli

@throws Exception
tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java