@Test
public void testParse()
                        throws Exception {

    GetFeatureInfoParser parser = new GetFeatureInfoParser();
    XMLStreamReader xmlStreamReader = createXmlStreamReader( "wms-1.3.0-GetFeatureInfo.xml" );
    GetFeatureInfo getFeatureInfo = parser.parse( xmlStreamReader );
    assertThat( getFeatureInfo.getWidth(), is( 1024 ) );
    assertThat( getFeatureInfo.getHeight(), is( 512 ) );
    assertThat( getFeatureInfo.getCoordinateSystem(), is( CRSManager.lookup( "EPSG:4326" ) ) );
    Envelope boundingBox = getFeatureInfo.getEnvelope();
    assertThat( boundingBox.getMin().get0(), is( -115.4 ) );
    assertThat( boundingBox.getMin().get1(), is( 35.0 ) );
    assertThat( boundingBox.getMax().get0(), is( -108.0 ) );
    assertThat( boundingBox.getMax().get1(), is( 44.0 ) );
    HashMap<String, List<?>> dimensions = getFeatureInfo.getDimensions();
    assertThat( dimensions.size(), is( 0 ) );
    Map<String, String> parameterMap = getFeatureInfo.getParameterMap();
    assertThat( parameterMap.size(), is( 1 ) );
    assertThat( parameterMap.get( "EXCEPTIONS" ), is( "XML" ) );
    assertThat( getFeatureInfo.getX(), is( 5 ) );
    assertThat( getFeatureInfo.getY(), is( 10 ) );
    assertThat( getFeatureInfo.getFeatureCount(), is( 42 ) );
    assertThat( getFeatureInfo.getInfoFormat(), is( "text/html" ) );
    assertThat( getFeatureInfo.getQueryLayers().size(), is( 2 ) );
    assertThat( getFeatureInfo.getQueryLayers(), hasLayerRef( "counties" ) );
    assertThat( getFeatureInfo.getQueryLayers(), hasLayerRef( "municipalities" ) );
}