public static void setReferenceAttributes(
     Reference reference, Feature feature, String id, ConfigState state, int min, int max) {
   reference.setFeature(feature);
   reference.setId(id);
   reference.setState(state);
   reference.setMin(min);
   reference.setMax(max);
 }
  public static Reference createReferenceWithProperties(
      Feature feature, String id, ConfigState state, int min, int max, Feature metaMetaModel) {
    Reference reference = FmpFactoryImpl.eINSTANCE.createReference();
    Feature metaMetaReference = (Feature) metaMetaModel.getChildren().get(2);
    reference.setProperties((Feature) ModelManipulation.INSTANCE.configure(metaMetaReference));
    setReferenceAttributes(reference, feature, id, state, min, max);

    return reference;
  }