SearchLevels { protected boolean isCpe(String potentialCpe){ return (! (null == potentialCpe)) && ( potentialCpe.startsWith(CPE_PREFIX) || potentialCpe.startsWith(OLD_CPE_PREFIX) ) && potentialCpe.length() > 10; } SearchLevels(CveSearchApi cveSearchApi); Stream<List<NeedleWithMeta>> apply(Release release);  }
@Test public void isCpeTestNull() { assert(!searchLevels.isCpe(null)); }
@Test public void isCpeTestEmpty() { assert(!searchLevels.isCpe("")); }
@Test public void isCpeTest_cpe() { assert(!searchLevels.isCpe("cpe")); }
@Test public void isCpeTestTrue() { assert(searchLevels.isCpe("cpe:2.3:a:vendor:product:version")); }
@Test public void isCpeTestOldFormat() { assert(searchLevels.isCpe("cpe:/a:vendor:product:version")); }
@Test public void isCpeTestPattern() { assert(searchLevels.isCpe("cpe:2.3:.*prod.*")); }