PubMedSearch { public Collection<BibliographicReference> searchAndRetrieveIdByHTTP( Collection<String> searchTerms ) throws IOException { Collection<BibliographicReference> results; results = fetchById( searchTerms ); log.info( "Fetched " + results.size() + " references" ); return results; } PubMedSearch(); Collection<BibliographicReference> searchAndRetrieveByHTTP( Collection<String> searchTerms ); Collection<BibliographicReference> searchAndRetrieveIdByHTTP( Collection<String> searchTerms ); Collection<String> searchAndRetrieveIdsByHTTP( Collection<String> searchTerms ); Collection<String> searchAndRetrieveIdsByHTTP( String searchQuery );  }
@Test public void testSearchAndRetrieveIdByHTTPBookshelf() throws Exception { try { PubMedSearch pms = new PubMedSearch(); Collection<String> searchTerms = new HashSet<>(); searchTerms.add( "23865096" ); Collection<BibliographicReference> actualResult = pms.searchAndRetrieveIdByHTTP( searchTerms ); assertEquals( 1, actualResult.size() ); } catch ( java.net.UnknownHostException e ) { PubMedSearchTest.log.warn( "Test skipped due to unknown host exception" ); } catch ( java.io.IOException e ) { this.checkCause( e ); } }