@Test
public void testReadUpdateWfs200AllOptionalAttributes()
                        throws Exception {

    XMLStreamReader xmlStream = getXMLStreamReader( UPDATE_ACTION3 );
    Update action = reader.readUpdate( xmlStream );
    assertEquals( "BLA", action.getHandle() );
    assertEquals( "application/gml+xml; version=3.2", action.getInputFormat() );
    assertEquals( "EPSG:4326", action.getSRSName() );
    Iterator<PropertyReplacement> replacementProps = action.getReplacementProps();
    PropertyReplacement replacement = replacementProps.next();
    assertEquals( UpdateAction.REPLACE, replacement.getUpdateAction() );
    assertEquals( new QName( "http://www.someserver.com/myns", "treeType" ),
                  replacement.getPropertyName().getAsQName() );
    XMLStreamReader valueStream = replacement.getReplacementValue();
    valueStream.require( XMLStreamReader.START_ELEMENT, WFS_200_NS, "Value" );
    assertEquals( "CONIFEROUS", valueStream.getElementText() );
    nextElement( valueStream );
    valueStream.require( XMLStreamReader.END_ELEMENT, WFS_200_NS, "Property" );
    nextElement( valueStream );
    assertTrue( replacementProps.hasNext() );
    replacement = replacementProps.next();
    assertEquals( UpdateAction.INSERT_AFTER, replacement.getUpdateAction() );
    assertEquals( new QName( "http://www.someserver.com/myns", "treeType2" ),
                  replacement.getPropertyName().getAsQName() );
    valueStream = replacement.getReplacementValue();
    valueStream.require( XMLStreamReader.START_ELEMENT, WFS_200_NS, "Value" );
    assertEquals( "CONIFEROUS", valueStream.getElementText() );
    nextElement( valueStream );
    valueStream.require( XMLStreamReader.END_ELEMENT, WFS_200_NS, "Property" );
    nextElement( valueStream );
    assertTrue( replacementProps.hasNext() );
    replacement = replacementProps.next();
    assertEquals( UpdateAction.INSERT_BEFORE, replacement.getUpdateAction() );
    assertEquals( new QName( "http://www.someserver.com/myns", "treeType3" ),
                  replacement.getPropertyName().getAsQName() );
    valueStream = replacement.getReplacementValue();
    valueStream.require( XMLStreamReader.START_ELEMENT, WFS_200_NS, "Value" );
    assertEquals( "CONIFEROUS", valueStream.getElementText() );
    nextElement( valueStream );
    valueStream.require( XMLStreamReader.END_ELEMENT, WFS_200_NS, "Property" );
    nextElement( valueStream );
    assertTrue( replacementProps.hasNext() );
    replacement = replacementProps.next();
    assertEquals( UpdateAction.REMOVE, replacement.getUpdateAction() );
    assertEquals( new QName( "http://www.someserver.com/myns", "treeType3" ),
                  replacement.getPropertyName().getAsQName() );
    valueStream = replacement.getReplacementValue();
    valueStream.require( XMLStreamReader.START_ELEMENT, WFS_200_NS, "Value" );
    assertEquals( "CONIFEROUS", valueStream.getElementText() );
    nextElement( valueStream );
    valueStream.require( XMLStreamReader.END_ELEMENT, WFS_200_NS, "Property" );
    nextElement( valueStream );
    assertFalse( replacementProps.hasNext() );
    Filter filter = action.getFilter();
    assertNotNull( filter );
    xmlStream.require( XMLStreamReader.END_ELEMENT, WFS_200_NS, "Update" );
}