@Test
public void parsePolygon()
                        throws XMLStreamException, FactoryConfigurationError, IOException, XMLParsingException,
                        UnknownCRSException {

    GMLStreamReader gmlReader = getParser( "Polygon.gml" );
    XMLStreamReader xmlReader = gmlReader.getXMLReader();
    Assert.assertEquals( XMLStreamConstants.START_ELEMENT, xmlReader.getEventType() );
    Assert.assertEquals( new QName( "http://www.opengis.net/gml", "Polygon" ), xmlReader.getName() );
    Polygon polygon = (Polygon) gmlReader.readGeometry();
    Assert.assertEquals( SurfaceType.Polygon, polygon.getSurfaceType() );
    Assert.assertEquals( XMLStreamConstants.END_ELEMENT, xmlReader.getEventType() );
    Assert.assertEquals( new QName( "http://www.opengis.net/gml", "Polygon" ), xmlReader.getName() );
    Assert.assertEquals( RingType.LinearRing, polygon.getExteriorRing().getRingType() );
    Assert.assertEquals( 2, polygon.getInteriorRings().size() );
    Assert.assertEquals( RingType.LinearRing, polygon.getInteriorRings().get( 0 ).getRingType() );
    Assert.assertEquals( RingType.LinearRing, polygon.getInteriorRings().get( 1 ).getRingType() );
}