Utils { public static InformationModel wrapFunctionBlock(FunctionblockModel fbModel) { InformationModel infomodel = InformationModelFactory.eINSTANCE.createInformationModel(); infomodel.setCategory(fbModel.getCategory()); infomodel.setDescription(fbModel.getDescription()); infomodel.setDisplayname(fbModel.getDisplayname()); infomodel.setName(fbModel.getName() + "IM"); infomodel.setNamespace(fbModel.getNamespace()); infomodel.setVersion(fbModel.getVersion()); FunctionblockProperty property = InformationModelFactory.eINSTANCE.createFunctionblockProperty(); property.setType(fbModel); property.setName(fbModel.getName().toLowerCase()); infomodel.getProperties().add(property); ModelReference reference = ModelFactory.eINSTANCE.createModelReference(); reference.setImportedNamespace(fbModel.getNamespace() + "." + fbModel.getName()); reference.setVersion(fbModel.getVersion()); infomodel.getReferences().add(reference); return infomodel; }  static InformationModel toInformationModel(Model model); static InformationModel wrapFunctionBlock(FunctionblockModel fbModel); static EList<Entity> getReferencedEntities(FunctionBlock fb); static EList<Enum> getReferencedEnums(FunctionBlock fb); static EList<Type> getReferencedTypes(Type type); static EList<Type> getReferencedTypes(Property property); static EList<Type> getReferencedTypes(FunctionBlock fb);  }
@Test public void wrapFunctionBlock() { InformationModel infomodel = Utils.wrapFunctionBlock(fbms.get(0)); assertNull(infomodel.getCategory()); assertEquals("SomeFbIM", infomodel.getName()); assertEquals("iot", infomodel.getNamespace()); assertEquals("", infomodel.getDescription()); assertEquals("0.0.1", infomodel.getVersion()); assertEquals("SomeFb", infomodel.getDisplayname()); }