@Test
public void testGetObjectByIdGeometry2()
                        throws FileNotFoundException, XMLStreamException, UnknownCRSException,
                        TransformationException {

    Object o = store.getObjectById( "RING_1" );
    Assert.assertTrue( o instanceof Ring );
    XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
    outputFactory.setProperty( "javax.xml.stream.isRepairingNamespaces", new Boolean( true ) );
    OutputStream out = new FileOutputStream( System.getProperty( "java.io.tmpdir" ) + File.separatorChar
                                             + "exported_ring.gml" );
    XMLStreamWriter writer = outputFactory.createXMLStreamWriter( out );
    writer.setDefaultNamespace( "http://www.opengis.net/gml" );
    GMLStreamWriter gmlStream = GMLOutputFactory.createGMLStreamWriter( GMLVersion.GML_31, writer );
    gmlStream.write( (Geometry) o );
}