### Question:
PopularItemRecommender extends AbstractItemRecommender implements ItemRecommender, ItemBasedItemRecommender { @Override public List<Long> recommendRelatedItems(long reference) { return recommendRelatedItems(reference, -1); } @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 testRecommendRelatedItems() { List<Long> results = recommender.recommendRelatedItems(1); assertThat(results, contains(2L)); }
@Test public void testRecommendAllRelatedItems() { List<Long> results = recommender.recommendRelatedItems(17); assertThat(results, contains(1L, 2L)); }
@Test public void testRecommendRelatedBasket() { List<Long> results = recommender.recommendRelatedItems(ImmutableSet.of(1L, 10L)); assertThat(results, contains(2L)); }
@Test public void testRecommendRelatedWithCandidates() { List<Long> results = recommender.recommendRelatedItems(ImmutableSet.of(), -1, ImmutableSet.of(1L), null); assertThat(results, contains(1L)); }
@Test public void testRecommendRelatedLimit() { List<Long> results = recommender.recommendRelatedItems(100, 1); assertThat(results, contains(1L)); }