use of eu.europeana.enrichment.api.external.model.LabelResource in project metis-framework by europeana.
the class ItemExtractorUtilsTest method extractLabelResources.
@Test
void extractLabelResources() {
List<LabelResource> labelResources = new ArrayList<>();
LabelResource labelResource1 = new LabelResource("resource1");
LabelResource labelResource2 = new LabelResource("resource2");
LabelResource labelResource3 = new LabelResource("resource3");
labelResources.add(labelResource1);
labelResources.add(labelResource2);
labelResources.add(labelResource3);
List<ResourceOrLiteralType> output = ItemExtractorUtils.extractLabelResources(labelResources, ResourceOrLiteralType::new);
for (LabelResource labelResource : labelResources) {
List<ResourceOrLiteralType> result = output.stream().filter(x -> x.getResource().getResource().equals(labelResource.getResource())).collect(Collectors.toList());
assertEquals(1, result.size());
}
}
Aggregations