### Question:
ThumbnailsAccessor extends MetadataAccessor { public List<String> copyThumbnails(EuropeanaQueryInterface search, File dir, int maxResults) throws IOException, EuropeanaApiProblem { EuropeanaApi2Results res = europeanaClient.searchApi2(search, maxResults, 0); List<EuropeanaApi2Item> items = res.getAllItems(); List<String> itemsOk = new ArrayList<String>(items.size()); EuropeanaApi2Item item; String id; String thumbnailUrl; for (int i = 0; i < items.size(); i++) { if (i % 10 == 0) log.info("Copying thumbnail: " + (i + 1) + " / " + items.size()); item = (EuropeanaApi2Item) items.get(i); id = item.getId(); if (item.getEdmPreview() == null || item.getEdmPreview().isEmpty()) { log.info("Skip item without thumbnail: " + id); continue; } thumbnailUrl = item.getEdmPreview().get(0); boolean fileOk = writeThumbnailToFolder(id, thumbnailUrl, dir); if (fileOk) itemsOk.add(id); } log.info("Copying finished OK, thumbnails generated: " + itemsOk.size()); return itemsOk; } ThumbnailsAccessor();  ThumbnailsAccessor(EuropeanaApi2Client apiClient); List<String> copyThumbnails(EuropeanaQueryInterface search,
			File dir, int maxResults); boolean writeThumbnailToFolder(String id, String thumbnailUrl,
			File imageFolder); List<String> copyThumbnails(Map<String, String> thumbnailsMap,
			File imageFolder); String copyThumbnail(String europeanaId, File imageFolder); boolean isFilterThumbnails(); void setFilterThumbnails(boolean filterThumbnails);  }### Answer:
@Test public void testCopyThumbnails() throws IOException, EuropeanaApiProblem { ThumbnailsAccessor ta = new ThumbnailsAccessor(new EuropeanaApi2Client()); EuropeanaQueryInterface query = new Api2Query(); query.setType("IMAGE"); query.setGeneralTerms("da vinci"); File tmpFolder = new File("/tmp/europeana/images"); List<String> thumbnailsCopied = ta.copyThumbnails(query, tmpFolder, 2); assertEquals(2, thumbnailsCopied.size()); }