return attribute;
}
public ProductAttribute createSelectWithOptionsAndApplyToSpecified() {
ProductAttribute attribute = new ProductAttribute();
attribute.setCode(MagjaStringUtils.randomString(3, 8).toUpperCase());
attribute.setScope(ProductAttribute.Scope.STORE);
attribute.setGroup("General");
attribute.setType("int");
attribute.setBackend("");
attribute.setFrontend("");
attribute.setLabel(MagjaStringUtils.randomString(3, 8).toUpperCase());
attribute.setInput("select");
attribute.setAttributeClass("");
attribute.setSource("");
attribute.setVisible(true);
attribute.setRequired(false);
attribute.setUserDefined(true);
attribute.setDefaultValue("");
attribute.setSearchable(true);
attribute.setFilterable(true);
attribute.setComparable(true);
attribute.setVisibleOnFront(false);
attribute.setVisibleInAdvancedSearch(true);
attribute.setUnique(false);
attribute.setApplyTo(new ArrayList<ProductType>());
attribute.getApplyTo().add(ProductTypeEnum.SIMPLE.getProductType());
attribute.getApplyTo().add(ProductTypeEnum.GROUPED.getProductType());
attribute.getApplyTo().add(ProductTypeEnum.CONFIGURABLE.getProductType());
// create some options
attribute.setOptions(new HashMap<Integer, String>());
attribute.getOptions().put(1, MagjaStringUtils.randomString(3, 8));
attribute.getOptions().put(2, MagjaStringUtils.randomString(3, 8));
attribute.getOptions().put(3, MagjaStringUtils.randomString(3, 8));
return attribute;
}