@Test
    public void testMultithreaded() throws Exception {
        int numThreads = 10;
        final int numIterations = 100;
        ExecutorService executorService = Executors.newFixedThreadPool(numThreads);
        try {
            ExecutorCompletionService<Integer> executorCompletionService = new ExecutorCompletionService<>(executorService);
            for (int i = 0; i < numThreads; i++) {
                executorCompletionService.submit(new Callable<Integer>() {
                    @Override
                    public Integer call() throws Exception {
                        for (int j = 0; j < numIterations; j++) {
                            Metadata m = new Metadata();
                            setupOOXMLMetadata(m);
                            m.set(Metadata.CONTENT_TYPE, OOXML_MIMETYPE);
                            XMPMeta xmp = TikaToXMP.convert(m);
                            checkOOXMLMetadata(xmp);
                        }
                        return 1;
                    }
                });
            }
            int finished = 0;
            while (finished < numThreads) {
                Future<Integer> future = executorCompletionService.poll(1, TimeUnit.MINUTES);
                if (future == null) {
                    throw new TimeoutException();
                }
                future.get();
                finished++;
            }
        } finally {
            executorService.shutdownNow();
        }
    }
Tests the Tika <code>Metadata</code> to XMP conversion functionatlity
tika-xmp/src/test/java/org/apache/tika/xmp/TikaToXMPTest.java