PentahoJndiConnectionReadHandler extends AbstractXmlReadHandler implements ConnectionReadHandler { protected void doneParsing() throws SAXException { final PentahoJndiDatasourceConnectionProvider provider = new PentahoJndiDatasourceConnectionProvider(); if ( pathReadHandler != null ) { provider.setJndiName( pathReadHandler.getResult() ); } if ( usernameReadHandler != null ) { provider.setUsername( usernameReadHandler.getResult() ); } if ( passwordReadHandler != null ) { provider.setPassword( passwordReadHandler.getResult() ); } this.connectionProvider = provider; } PentahoJndiConnectionReadHandler(); ConnectionProvider getProvider(); Object getObject();  }
@Test public void testDoneParsing() throws Exception { Attributes attrs = mock( Attributes.class ); assertNull( handler.getProvider() ); handler.getHandlerForChild( null, "path", attrs ); handler.doneParsing(); assertNotNull( handler.getProvider() ); assertNotNull( handler.getObject() ); handler.getHandlerForChild( null, "username", attrs ); handler.doneParsing(); assertNotNull( handler.getProvider() ); assertNotNull( handler.getObject() ); handler.getHandlerForChild( null, "password", attrs ); handler.doneParsing(); assertNotNull( handler.getProvider() ); assertNotNull( handler.getObject() ); }