src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
@Test
    public void testRdfNtSerializer() {
        initializeGraph();
        SerializingProvider provider = new JenaSerializerProvider();

        ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream();
        provider.serialize(serializedGraph, mGraph.getImmutableGraph(), "application/n-triples");
        InputStream in = new ByteArrayInputStream(serializedGraph.toByteArray());

        ImmutableGraph deserializedGraph = parse(in, "N-TRIPLE");
        Assertions.assertEquals(mGraph.getImmutableGraph(), deserializedGraph);
    }
/*
     * Serialize ImmutableGraph to rdf+nt format and deserialize.
     */
Serialize ImmutableGraph to rdf+nt format and deserialize.
Serialize ImmutableGraph to rdf + nt format and deserialize .
@Test
    public void testRdfNtSerializer() {
        initializeGraph();
        SerializingProvider provider = new JenaSerializerProvider();
        ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream();
        provider.serialize(serializedGraph, mGraph.getImmutableGraph(), "application/n-triples");
        InputStream in = new ByteArrayInputStream(serializedGraph.toByteArray());
        ImmutableGraph deserializedGraph = parse(in, "N-TRIPLE");
        Assertions.assertEquals(mGraph.getImmutableGraph(), deserializedGraph);
    }
@ Test public void testRdfNtSerializer ( ) { initializeGraph ( ) ; SerializingProvider provider = new JenaSerializerProvider ( ) ; ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream ( ) ; provider . serialize ( serializedGraph , mGraph . getImmutableGraph ( ) , "application/n-triples" ) ; InputStream in = new ByteArrayInputStream ( serializedGraph . toByteArray ( ) ) ; ImmutableGraph deserializedGraph = parse ( in , "N-TRIPLE" ) ; Assertions . assertEquals ( mGraph . getImmutableGraph ( ) , deserializedGraph ) ; }
Serialize ImmutableGraph to rdf+nt format and deserialize.
Serialize ImmutableGraph to rdf + nt format and deserialize .