@Test
public void testReadExampleDictionary()
                        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();
    assertEquals( "CodeLists", dict.getId() );
    assertEquals( 2, dict.size() );
    assertEquals( "XP_HorizontaleAusrichtung", dict.get( 0 ).getId() );
    assertEquals( "XP_BedeutungenBereich", dict.get( 1 ).getId() );
}