public static String detectWithCustomConfig(String name) throws Exception {
        String config = "/org/apache/tika/mime/tika-mimetypes.xml";
        Tika tika = new Tika(MimeTypesFactory.create(config));
        return tika.detect(name);
    }
@Test
    public void testDetectWithCustomConfig() throws Exception {
        assertEquals("application/xml", AdvancedTypeDetector.detectWithCustomConfig("pom.xml"));
    }