@Test
    public void testBasic(@TempDir Path tmp) throws Exception {
        Path tikaConfig = tmp.resolve("tika-config.xml");
        String xml = IOUtils.toString(
                PipesServerTest.class.getResourceAsStream("TIKA-3941.xml"), StandardCharsets.UTF_8);
        xml = xml.replace("BASE_PATH", tmp.toAbsolutePath().toString());
        Files.write(tikaConfig, xml.getBytes(StandardCharsets.UTF_8));

        Files.copy(PipesServerTest.class.getResourceAsStream("/test-documents/mock_times.xml"),
                tmp.resolve("mock.xml"));

        PipesServer pipesServer = new PipesServer(tikaConfig,
                UnsynchronizedByteArrayInputStream.builder().setByteArray(new byte[0]).get(),
                new PrintStream(UnsynchronizedByteArrayOutputStream.builder().get(), true,
                        StandardCharsets.UTF_8.name()),
                -1, 30000, 30000);

        pipesServer.initializeResources();

        FetchEmitTuple fetchEmitTuple = new FetchEmitTuple("id",
                new FetchKey("fs", "mock.xml"),
                new EmitKey("", ""));
        Fetcher fetcher = FetcherManager.load(tikaConfig).getFetcher();
        PipesServer.MetadataListAndEmbeddedBytes
                parseData = pipesServer.parseFromTuple(fetchEmitTuple, fetcher);
        assertEquals("5f3b924303e960ce35d7f705e91d3018dd110a9c3cef0546a91fe013d6dad6fd",
                parseData.metadataList.get(0).get("X-TIKA:digest:SHA-256"));
    }
This test is useful for stepping through the debugger on PipesServer
without having to attach the debugger to the forked process.

@param tmp
@throws Exception
tika-core/src/test/java/org/apache/tika/pipes/PipesServerTest.java