@Test public void testGetFavorites() throws Exception { Mockito.doReturn(Collections.emptyList()).when(favoritesRepository).getFavorites(Mockito.any()); Favorites favorites = new FavoritesImpl(favoritesRepository); UserInfo.Username user = UserInfo.Username.valueOf("TestUser"); favorites.getFavorites(user); Mockito.verify(favoritesRepository).getFavorites(user); }
@Override public List<Experiment.ID> getFavorites(UserInfo.Username username) { return favoritesRepository.getFavorites(username); }
FavoritesImpl implements Favorites { @Override public List<Experiment.ID> getFavorites(UserInfo.Username username) { return favoritesRepository.getFavorites(username); } }
FavoritesImpl implements Favorites { @Override public List<Experiment.ID> getFavorites(UserInfo.Username username) { return favoritesRepository.getFavorites(username); } @Inject  FavoritesImpl(final FavoritesRepository favoritesRepository); }
FavoritesImpl implements Favorites { @Override public List<Experiment.ID> getFavorites(UserInfo.Username username) { return favoritesRepository.getFavorites(username); } @Inject  FavoritesImpl(final FavoritesRepository favoritesRepository); @Override List<Experiment.ID> getFavorites(UserInfo.Username username); @Override List<Experiment.ID> addFavorite(UserInfo.Username username, Experiment.ID experimentID); @Override List<Experiment.ID> deleteFavorite(UserInfo.Username username, Experiment.ID experimentID); }
FavoritesImpl implements Favorites { @Override public List<Experiment.ID> getFavorites(UserInfo.Username username) { return favoritesRepository.getFavorites(username); } @Inject  FavoritesImpl(final FavoritesRepository favoritesRepository); @Override List<Experiment.ID> getFavorites(UserInfo.Username username); @Override List<Experiment.ID> addFavorite(UserInfo.Username username, Experiment.ID experimentID); @Override List<Experiment.ID> deleteFavorite(UserInfo.Username username, Experiment.ID experimentID);  }