@Test
    void testExport1() throws IOException {

        final ExplorerNode systemNode = explorerNodeService.getRoot();
        final DocRef systemDocRef = systemNode != null
                ? systemNode.getDocRef()
                : null;
        assertThat(explorerNodeService.getDescendants(systemDocRef).size()).isEqualTo(1);

        // GitRepo
        final ExplorerNode gitRepoNode = explorerService.create(GitRepoDoc.TYPE,
                "GitRepo",
                systemNode,
                null);
        GitRepoDoc gitRepoDoc = gitRepoStore.readDocument(gitRepoNode.getDocRef());
        gitRepoDoc.setDescription("Original Description");
        gitRepoStore.writeDocument(gitRepoDoc);

        final ExplorerNode folder1 = explorerService.create(ExplorerConstants.FOLDER_TYPE,
                "folder1",
                gitRepoNode,
                null);
        final ExplorerNode folder2 = explorerService.create(ExplorerConstants.FOLDER_TYPE,
                "folder2",
                gitRepoNode,
                null);

        assertThat(explorerNodeService.getDescendants(systemDocRef).size()).isEqualTo(4);

        final ExplorerNode pipelineNode = explorerService.create(PipelineDoc.TYPE,
                "Pipeline",
                folder2,
                null);
        final PipelineDoc pipelineDoc = pipelineStore.readDocument(pipelineNode.getDocRef());
        pipelineDoc.setDescription("Pipeline Description");
        pipelineStore.writeDocument(pipelineDoc);

        final ExplorerNode feedNode = explorerService.create(FeedDoc.TYPE,
                "FEED",
                folder1,
                null);
        final FeedDoc feedDoc = feedStore.readDocument(feedNode.getDocRef());
        feedDoc.setDescription("Feed Description");
        feedStore.writeDocument(feedDoc);

        commonTestControl.createRequiredXMLSchemas();

        final Path testDataDir = getCurrentTestDir().resolve("ExportGitRepoTest");
        LOGGER.info("Writing to test dir: {}", testDataDir);

        FileUtil.deleteDir(testDataDir);
        Files.createDirectories(testDataDir);

        // List of paths to remove from the exported paths
        // Basically the path to the GitRepoDoc node
        List<ExplorerNode> rootNodePath = List.of(ExplorerConstants.SYSTEM_NODE, gitRepoNode);

        // List of nodes to export.
        Set<DocRef> docRefsToExport = Set.of(
                gitRepoDoc.asDocRef(),
                feedNode.getDocRef(),
                pipelineNode.getDocRef());

        // List of doctypes to ignore - GitRepos so we ignore recursive repos
        Set<String> docTypesToIgnore = Set.of(GitRepoDoc.TYPE);

        // Run the export to disk
        importExportSerializer.write(
                rootNodePath,
                testDataDir,
                docRefsToExport,
                docTypesToIgnore,
                true);

        List<String> pathPatterns = List.of(
                "",
                "folder1",
                "folder1/FEED\\.Feed\\.[-a-f0-9]*.meta",
                "folder1/FEED\\.Feed\\.[-a-f0-9]*.node",
                "folder2",
                "folder2/Pipeline\\.Pipeline\\.[-a-f0-9]*.meta",
                "folder2/Pipeline\\.Pipeline\\.[-a-f0-9]*.node",
                "folder2/Pipeline\\.Pipeline\\.[-a-f0-9]*.xml");

        this.testGitFilesOnDisk("testExport1",
                testDataDir,
                pathPatterns);

    }
Basic test - a few elements exported.
@throws IOException If something goes really wrong
stroom-app/src/test/java/stroom/importexport/TestImportExportGitRepo.java