Source:
public void testSetGetProperty ( ) { java.lang.String validName = "http://xml.org/sax/properties/lexical-handler" ; org.xml.sax.ext.LexicalHandler validValue = new tests.api.org.xml.sax.support.MockHandler ( new tests.api.org.xml.sax.support.MethodLogger ( ) ) ; try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.setProperty ( validName , validValue ) ; assertEquals ( validValue , parser.getProperty ( validName ) ) ; parser.setProperty ( validName , null ) ; assertEquals ( null , parser.getProperty ( validName ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.setProperty ( "foo" , "bar" ) ; fail ( "SAXNotRecognizedException expected" ) ; } catch ( org.xml.sax.SAXNotRecognizedException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.getProperty ( "foo" ) ; fail ( "SAXNotRecognizedException expected" ) ; } catch ( org.xml.sax.SAXNotRecognizedException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.setProperty ( null , "bar" ) ; fail ( "NullPointerException expected" ) ; } catch ( java.lang.NullPointerException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.getProperty ( null ) ; fail ( "NullPointerException expected" ) ; } catch ( java.lang.NullPointerException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }

Target:
public void testSetGetProperty ( ) { java.lang.String validName = "http://xml.org/sax/properties/lexical-handler" ; org.xml.sax.ext.LexicalHandler validValue = new org.apache.harmony.tests.org.xml.sax.support.MockHandler ( new org.apache.harmony.tests.org.xml.sax.support.MethodLogger ( ) ) ; try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.setProperty ( validName , validValue ) ; assertEquals ( validValue , parser.getProperty ( validName ) ) ; parser.setProperty ( validName , null ) ; assertEquals ( null , parser.getProperty ( validName ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.setProperty ( "foo" , "bar" ) ; fail ( "SAXNotRecognizedException expected" ) ; } catch ( org.xml.sax.SAXNotRecognizedException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.getProperty ( "foo" ) ; fail ( "SAXNotRecognizedException expected" ) ; } catch ( org.xml.sax.SAXNotRecognizedException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.setProperty ( null , "bar" ) ; fail ( "NullPointerException expected" ) ; } catch ( java.lang.NullPointerException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } try { javax.xml.parsers.SAXParser parser = spf.newSAXParser ( ) ; parser.getProperty ( null ) ; fail ( "NullPointerException expected" ) ; } catch ( java.lang.NullPointerException e ) { } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }