@Test
public void testCreate() throws LayerException {
Object o = featureModel.newInstance();
OneToManyAttribute many = new OneToManyAttribute(new ArrayList<AssociationValue>());
ManyToOneAttribute one = new ManyToOneAttribute(new AssociationValue(null, new HashMap<String, Attribute<?>>(),
false));
// create 2 manyInMany
OneToManyAttribute manyInMany = new OneToManyAttribute(new ArrayList<AssociationValue>());
AssociationValue manyInMany1 = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
manyInMany1.getAllAttributes().put("textAttr", new StringAttribute("manyInMany1"));
manyInMany.getValue().add(manyInMany1);
AssociationValue manyInMany2 = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
manyInMany2.getAllAttributes().put("textAttr", new StringAttribute("manyInMany2"));
manyInMany.getValue().add(manyInMany2);
// create oneInMany
ManyToOneAttribute oneInMany = new ManyToOneAttribute();
AssociationValue oneInManyValue = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
oneInManyValue.getAllAttributes().put("textAttr", new StringAttribute("oneInMany"));
oneInMany.setValue(oneInManyValue);
// create 2 manyInOne
OneToManyAttribute manyInOne = new OneToManyAttribute(new ArrayList<AssociationValue>());
AssociationValue manyInOne1 = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
manyInOne1.getAllAttributes().put("textAttr", new StringAttribute("manyInOne1"));
manyInOne.getValue().add(manyInOne1);
AssociationValue manyInOne2 = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
manyInOne2.getAllAttributes().put("textAttr", new StringAttribute("manyInOne2"));
manyInOne.getValue().add(manyInOne2);
// create oneInOne
ManyToOneAttribute oneInOne = new ManyToOneAttribute();
AssociationValue oneInOneValue = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
oneInOneValue.getAllAttributes().put("textAttr", new StringAttribute("oneInOne"));
oneInOne.setValue(oneInOneValue);
// create 2 many
AssociationValue many1 = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
AssociationValue many2 = new AssociationValue(null, new HashMap<String, Attribute<?>>(), false);
// add manyInMany to many1