### Question:
PopularItemRecommender extends AbstractItemRecommender implements ItemRecommender, ItemBasedItemRecommender { @Override protected ResultList recommendWithDetails(long user, int n, @Nullable LongSet candidates, @Nullable LongSet exclude) { return recommend(user, n, candidates, exclude) .stream() .map(i -> Results.create(i, statistics.getInteractionCount(i))) .collect(Results.listCollector()); } @Inject  PopularItemRecommender(InteractionStatistics stats, DataAccessObject dao); @Override List<Long> recommendRelatedItems(long reference); @Override List<Long> recommendRelatedItems(long reference, int n); @Override List<Long> recommendRelatedItems(Set<Long> basket); @Override List<Long> recommendRelatedItems(Set<Long> basket, int n); @Override LongList recommendRelatedItems(Set<Long> basket, int n, @Nullable Set<Long> candidates, @Nullable Set<Long> exclude); @Override ResultList recommendRelatedItemsWithDetails(Set<Long> basket, int n, @Nullable Set<Long> candidates, @Nullable Set<Long> exclude);  }### Answer:
@Test public void testRecommendForUserWithDetails() { ResultList results = recommender.recommendWithDetails(17, -1, null, null); assertThat(results.idList(), contains(1L, 2L)); }