### Question:
CveSearchDataTranslator implements EntityTranslator<CveSearchData, CveSearchDataTranslator.VulnerabilityWithRelation> { @Override public VulnerabilityWithRelation apply(CveSearchData cveSearchData) { Vulnerability vulnerability = new CveSearchDataToVulnerabilityTranslator().apply(cveSearchData); ReleaseVulnerabilityRelation relation = new CveSearchDataToReleaseVulnerabilityRelationTranslator().apply(cveSearchData); return new VulnerabilityWithRelation(vulnerability,relation); }  @Override VulnerabilityWithRelation apply(CveSearchData cveSearchData);  }### Answer:
@Test public void testWithRealData() throws IOException { List<CveSearchData> cveSearchDatas = cveSearchApi.search("zyxel","zywall"); List<CveSearchDataTranslator.VulnerabilityWithRelation> vms = cveSearchDatas.stream() .map(cveSearchData -> cveSearchDataTranslator.apply(cveSearchData)) .collect(Collectors.toList()); }
@Test public void testWithApacheData() throws IOException { List<CveSearchData> cveSearchDatas = cveSearchApi.search("apache",".*"); List<CveSearchDataTranslator.VulnerabilityWithRelation> vms = cveSearchDatas.stream() .map(cveSearchData -> cveSearchDataTranslator.apply(cveSearchData)) .collect(Collectors.toList()); List<Vulnerability> vs = vms.stream() .map(vm -> vm.vulnerability) .collect(Collectors.toList()); assert(vs.size() > 700); }