@Test
public void testWriteExampleDictionary()
                        throws XMLStreamException, FactoryConfigurationError, IOException {

    URL url = GMLDictionaryReaderTest.class.getResource( "../misc/dictionary/example_dictionary.gml" );
    XMLStreamReader xmlStream = XMLInputFactory.newInstance().createXMLStreamReader( url.toString(),
                                                                                     url.openStream() );
    // skip START_DOCUMENT event
    xmlStream.nextTag();
    GMLDictionaryReader dictReader = new GMLDictionaryReader( GML_30, xmlStream, new GmlDocumentIdContext( GML_30 ) );
    Dictionary dict = (Dictionary) dictReader.read();        
    XMLMemoryStreamWriter xmlWriter = new XMLMemoryStreamWriter();
    GMLDictionaryWriter writer = new GMLDictionaryWriter( GML_30, new IndentingXMLStreamWriter( xmlWriter.getXMLStreamWriter() ));
    writer.write( dict );
    xmlWriter.getXMLStreamWriter().close();
      LOG.debug (xmlWriter.toString());
}