CveSearchGuesser { public List<Match> guessProducts(String vendor, String productHaystack) throws IOException { if (!addProductGuesserIfNeeded(vendor)) { throw new IOException("Was not able to instantiate product guesser for vendor " + vendor); } return getBest(productMatchers.get(vendor).getMatches(productHaystack), productThreshold); } CveSearchGuesser(CveSearchApi cveSearchApi); void setVendorThreshold(int vendorThreshold); void setProductThreshold(int productThreshold); void setCutoff(int cutoff); boolean addVendorGuesserIfNeeded(); boolean addProductGuesserIfNeeded(String vendor); List<Match> getBest(List<Match> matches, int threshold); List<Match> guessVendors(String vendorHaystack); List<Match> guessProducts(String vendor, String productHaystack); List<Match> guessVendorAndProducts(String haystack); List<Match> guessVendorAndProducts(String vendorHaystack, String productHaystack);  }
@Test public void guessProductTestMavenFullMatch() throws Exception { String apache = "apache"; String maven = "maven"; String result2 = this.cveSearchGuesser.guessProducts(apache,maven).get(0).getNeedle(); assert(result2.equals(maven)); }