@Test
    public void testMinShouldMatch() throws Exception {
        System.setProperty(MimeTypesFactory.CUSTOM_MIMES_SYS_PROP,
                "src/test/resources/org/apache/tika/mime/custom-mimetypes-minShouldMatch.xml");
        MimeTypes mimeTypes = MimeTypes.getDefaultMimeTypes(new CustomClassLoader());

        //matches one
        assertEquals("hello/world-min-file",
                getTypeAsString(mimeTypes, "Hello World!", new Metadata()));

        //matches two
        assertEquals("hello/world-min-file",
                getTypeAsString(mimeTypes, "Hello Welt!", new Metadata()));

        //matches two
        assertEquals("hello/world-min-file",
                getTypeAsString(mimeTypes, "Hallo Welt!", new Metadata()));

        //missing !
        assertEquals("text/plain", getTypeAsString(mimeTypes, "Hello World", new Metadata()));

        //Hello requires world, welt or hallo; monde requires bonjour le
        assertEquals("text/plain", getTypeAsString(mimeTypes, "Hello Monde", new Metadata()));

        //this matcher is treated as "or" with minshouldmatch clause
        assertEquals("hello/world-min-file",
                getTypeAsString(mimeTypes, "Bonjour le Monde!", new Metadata()));

    }
TIKA-2460 Test loading of custom-mimetypes.xml from sys prop.
tika-core/src/test/java/org/apache/tika/mime/MimeTypesReaderTest.java