LockFeatureXMLAdapter extends AbstractWFSRequestXMLAdapter { public LockFeature parse() throws Exception { Version version = determineVersion110Safe(); LockFeature result = null; if ( VERSION_100.equals( version ) ) { result = parse100(); } else if ( VERSION_110.equals( version ) ) { result = parse110(); } else if ( VERSION_200.equals( version ) ) { result = parse200(); } else { String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_100, VERSION_110, VERSION_200 ) ); throw new InvalidParameterValueException( msg ); } return result; }  LockFeature parse(); @SuppressWarnings("boxing") LockFeature parse100(); @SuppressWarnings("boxing") LockFeature parse110(); @SuppressWarnings("boxing") LockFeature parse200();  }
@Test public void testWfs200SpecExample1() throws Exception { LockFeatureXMLAdapter parser = new LockFeatureXMLAdapter(); parser.load( LockFeatureXMLAdapterTest.class.getResource( "wfs200/example1.xml" ) ); LockFeature request = parser.parse(); assertEquals( VERSION_200, request.getVersion() ); assertFalse( request.getLockAll() ); assertEquals( 1, request.getQueries().size() ); assertNull( request.getExistingLockId() ); assertNull( request.getExpiryInSeconds() ); assertNull( request.getHandle() ); }