@Test
    public void testMultiThreaded() throws Exception {
        MimeTypes mimeTypes = MimeTypes.getDefaultMimeTypes();
        Executors.newFixedThreadPool(1).execute(() -> {
            try {
                for (int i = 0; i < 500 && !stop; i++) {
                    mimeTypes.forName("abc" + i + "/abc");
                }
            } catch (MimeTypeException e) {
                e.printStackTrace();
            }
        });

        for (int i = 0; i < 500 & !stop; i++) {
            mimeTypes.getMediaTypeRegistry().getAliases(MediaType.APPLICATION_ZIP);
        }
    }
TIKA-2460 Test loading of custom-mimetypes.xml from sys prop.
tika-core/src/test/java/org/apache/tika/mime/MimeTypesReaderTest.java