    @Test
    public void testTrivialGraphFormatExport() throws Exception {

        PluginManager.registerClass(TrivialGraphFormatExport.class);

        ByteArrayOutputStream result = new ByteArrayOutputStream();
        OutputStreamWriter out = new OutputStreamWriter(result);

        ExportFilterManager.instantiateExportFilterByExtension(Structure.class, "tgf")
                .exportGraph((Structure) getTestStructure(), out, null);
        out.flush();

        // Because vertices in TGF have no labels, their order is undetermined.
        // So we accept both possibilities.
        assertThat(result.toString(),
                isOneOf("0\n1\n#\n0 1\n#\n",
                        "0\n1\n#\n1 0\n#\n"));
    }