### Question:
CveSearchWrapper { public Optional<List<CveSearchData>> searchForRelease(Release release) { try { return Optional.of(heuristic.run(release)); } catch (IOException e) { log.error("Was not able to search for release with name=" + release.getName() + " and id=" + release.getId(), e); } return Optional.empty(); } CveSearchWrapper(CveSearchApi cveSearchApi); Optional<List<CveSearchData>> searchForRelease(Release release);  }### Answer:
@Ignore @Test public void testLargeData() { Release release = new ReleaseBuilder() .setName("server") .get(); Optional<List<CveSearchData>> resultWrapped = cveSearchWrapper.searchForRelease(release); assert(resultWrapped.isPresent()); }
@Test public void compareToSearchByCPE() throws IOException { Release release = new ReleaseBuilder() .setName("blindstring") .setVendorFullname("blindstring") .setVendorShortname("blindstring") .setCpe(CPE) .get(); List<CveSearchData> resultDirect = cveSearchApi.cvefor(CPE); Optional<List<CveSearchData>> resultWrapped = cveSearchWrapper.searchForRelease(release); assert(resultWrapped.isPresent()); assert(isEquivalent(resultDirect,resultWrapped.get())); }
@Ignore("meanwhile cveSearchWrapper implementation changed, test maybe suitable for later use") @Test public void compareToWithoutWrapper() throws IOException { Release release = new ReleaseBuilder() .setName(PRODUCTNAME) .setVendorFullname(VENDORNAME) .get(); List<CveSearchData> resultDirect = cveSearchApi.search(VENDORNAME, PRODUCTNAME); Optional<List<CveSearchData>> resultWrapped = cveSearchWrapper.searchForRelease(release); assert(resultWrapped.isPresent()); assert(resultWrapped.get().size() > 0); assert(isEquivalent(resultDirect,resultWrapped.get())); }