JcrBackedDatasourceMgmtService implements IDatasourceMgmtService { public IDatabaseConnection getDatasourceById( String id ) throws DatasourceMgmtServiceException { RepositoryFile file = null; try { file = repository.getFileById( id ); } catch ( UnifiedRepositoryException ure ) { throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString( "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", file != null ? file.getName() : id ), ure ); } if ( file != null ) { return getDatasource( file ); } return null; } JcrBackedDatasourceMgmtService();  JcrBackedDatasourceMgmtService( IUnifiedRepository repository, IDatabaseDialectService databaseDialectService ); void init( IPentahoSession session ); String createDatasource( IDatabaseConnection databaseConnection ); void deleteDatasourceByName( String name ); void deleteDatasourceById( String id ); IDatabaseConnection getDatasourceByName( String name ); IDatabaseConnection getDatasourceById( String id ); List<IDatabaseConnection> getDatasources(); List<String> getDatasourceIds(); String updateDatasourceById( String id, IDatabaseConnection databaseConnection ); String updateDatasourceByName( String name, IDatabaseConnection databaseConnection );  }
@Test public void testgetDatasourceById() throws Exception { testgetDatasourceById( false ); }