private void assertAutoDetect(String resource, String type, String content) throws Exception {

        resource = "/test-documents/" + resource;

        // TODO !!!!  The disabled tests below should work!
        // The correct MIME type should be determined regardless of the
        // stated type (ContentType hint) and the stated URL name.


        // Try different combinations of correct and incorrect arguments:
        final String wrongMimeType = RAW;
        assertAutoDetect(resource, resource, type, type, content);
        assertAutoDetect(resource, resource, type, null, content);
        assertAutoDetect(resource, resource, type, wrongMimeType, content);

        assertAutoDetect(resource, null, type, type, content);
        assertAutoDetect(resource, null, type, null, content);
        assertAutoDetect(resource, null, type, wrongMimeType, content);

        final String badResource = "a.xyz";
        assertAutoDetect(resource, badResource, type, type, content);
        assertAutoDetect(resource, badResource, type, null, content);
        assertAutoDetect(resource, badResource, type, wrongMimeType, content);
    }
Convenience method -- its sole purpose of existence is to make the
call to it more readable than it would be if a TestParams instance
would need to be instantiated there.

@param resourceRealName        real name of resource
@param resourceStatedName      stated name -- will a bad name fool us?
@param realType                - the real MIME type
@param statedType              - stated MIME type - will a wrong one fool us?
@param expectedContentFragment - something expected in the text
@throws Exception
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java