AttributeServiceImpl extends BaseGenericServiceImpl<Attribute> implements AttributeService { @Override public List<Attribute> findByAttributeGroupCode(final String attributeGroupCode) { return attributeDao.findByNamedQuery("ATTRIBUTES.BY.GROUPCODE", attributeGroupCode); } AttributeServiceImpl(final GenericDAO<Attribute, Long> attributeDao,
                                final AttributeGroupService attributeGroupService); @Override List<Attribute> findByAttributeGroupCode(final String attributeGroupCode); @Override Attribute findByAttributeCode(final String attributeCode); @Override List<Attribute> findAttributesWithMultipleValues(final String attributeGroupCode); @Override List<Attribute> findAttributes(final int start, final int offset, final String sort, final boolean sortDescending, final Map<String, List> filter); @Override int findAttributeCount(final Map<String, List> filter); @Override List<Attribute> findAvailableAttributes(final String attributeGroupCode, final List<String> exclude); @Override Attribute getByAttributeCode(final String attributeCode); @Override List<Attribute> findAttributesByCodes(final String attributeGroupCode, final List<String> codes); @Override List<Attribute> getAvailableAttributesByProductTypeId(final long productTypeId); @Override List<Attribute> getAvailableImageAttributesByGroupCode(final String attributeGroupCode); @Override List<Attribute> getAvailableAttributesByGroupCodeStartsWith(final String attributeGroupCode, final String codePrefix); @Override Set<String> getAllAttributeCodes(); @Override Set<String> getAllNavigatableAttributeCodes(); @Override Set<String> getAllSearchableAttributeCodes(); @Override Set<String> getAllSearchablePrimaryAttributeCodes(); @Override Set<String> getAllStorableAttributeCodes(); @Override Map<String, Integer> getSingleNavigatableAttributeCodesByProductType(final long productTypeId); @Override I18NModel getNavigatableAttributeDisplayValue(final String attrCode, final String value); @Override Map<String, I18NModel> getAllAttributeNames(); @Override Map<String, I18NModel> getAttributeNamesByCodes(final Set<String> codes);  }
@Test public void testFindByAttributeGroupCode() { List<Attribute> attrs = attributeService.findByAttributeGroupCode(AttributeGroupNames.CUSTOMER); assertEquals(9, attrs.size()); }