@Test
        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
        @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
        @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
        @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
        public void shouldTransformGraphMLV2ToV3ViaXSLT() throws Exception {
            final InputStream stylesheet = Thread.currentThread().getContextClassLoader().getResourceAsStream("tp2-to-tp3-graphml.xslt");
            final InputStream datafile = getResourceAsStream(GraphMLResourceAccess.class, "tinkerpop-classic-tp2.xml");
            final ByteArrayOutputStream output = new ByteArrayOutputStream();

            final TransformerFactory tFactory = TransformerFactory.newInstance();
            final StreamSource stylesource = new StreamSource(stylesheet);
            final Transformer transformer = tFactory.newTransformer(stylesource);

            final StreamSource source = new StreamSource(datafile);
            final StreamResult result = new StreamResult(output);
            transformer.transform(source, result);

            final GraphReader reader = GraphMLReader.build().create();
            reader.readGraph(new ByteArrayInputStream(output.toByteArray()), graph);
            assertClassicGraph(graph, false, true);
        }
Note: this is only a very lightweight test of writer/reader encoding. It is known that there are characters
which, when written by GraphMLWriter, cause parse errors for GraphMLReader. However, this happens uncommonly
enough that is not yet known which characters those are. Only need to execute this test with TinkerGraph
or other graphs that support user supplied identifiers.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java