ShopServiceImpl extends BaseGenericServiceImpl<Shop> implements ShopService { @Override public Set<Long> getShopCategoriesIds(final long shopId) { return shopCategoryRelationshipSupport.getShopCategoriesIds(shopId); } ShopServiceImpl(final GenericDAO<Shop, Long> shopDao,
                           final CategoryService categoryService,
                           final ContentService contentService,
                           final AttributeService attributeService,
                           final ShopCategoryRelationshipSupport shopCategoryRelationshipSupport); @Override Shop getShopByOrderGuid(final String orderGuid); @Override Shop getShopByCode(final String shopCode); @Override List<Shop> getNonSubShops(); @Override Map<Long, Set<Long>> getAllShopsAndSubs(); @Override List<Shop> getSubShopsByMaster(final long masterId); @Override Shop getSubShopByNameAndMaster(final String shopName, final long masterId); @Override Shop getShopByOrderNum(final String orderNum); @Override Shop getById(final long shopId); @Override List<Shop> getAll(); @Override Shop getShopByDomainName(final String serverName); @Override Set<Long> getShopsCategoriesIds(final Collection<Long> shopId); @Override Set<Long> getShopCategoriesIds(final long shopId); @Override Set<Long> getShopsContentIds(final Collection<Long> shopId); @Override Set<Long> getShopContentIds(final long shopId); @Override Set<Long> getShopsAllCategoriesIds(final Collection<Long> shopId); @Override Set<Long> getShopAllCategoriesIds(final long shopId); Set<Long> transform(final Collection<Category> categories); @Override List<String> findAllSupportedCurrenciesByShops(); @Override Set<Category> getTopLevelCategories(final Long shopId); @Override Set<Category> findAllByShopId(final long shopId); @Override Category getDefaultNavigationCategory(final long shopId); @Override Long getShopCategoryParentId(final long shopId, final long categoryId, final boolean includeDirectLinks); @Override String getShopCategoryTemplate(final long shopId, final long categoryId); @Override String getShopCategorySearchTemplate(final long shopId, final long categoryId); @Override Long getShopCategoryProductTypeId(final long shopId, final long categoryId); @Override Long findShopIdByCode(final String code); @Override void updateAttributeValue(final long shopId, final String attributeKey, final String attributeValue); @Override Shop create(final Shop instance); ShopService getSelf();  }
@Test public void testGetAllCategoriesTestOnShopWithLinkedAssignedCategories() { List<Long> categories = Arrays.asList(401L, 411L , 312L , 313L); Set<Long> categorySet = shopService.getShopCategoriesIds(70L); assertFalse(categorySet.isEmpty()); assertEquals(categories.size(), categorySet.size()); assertTrue(categories.containsAll(categorySet)); }