Sync Integ to Master
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / jsontitan / utils / GraphTestUtils.java
index 862515c..72919b6 100644 (file)
@@ -32,6 +32,7 @@ import org.apache.tinkerpop.gremlin.structure.io.IoCore;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
 import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
+import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils;
 import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
@@ -44,6 +45,12 @@ import fj.data.Either;
 
 public final class GraphTestUtils {
 
+       public static void createRootCatalogVertex(TitanDao titanDao) {
+               GraphVertex catalogRootVertex = new GraphVertex(VertexTypeEnum.CATALOG_ROOT);
+               catalogRootVertex.setUniqueId(IdBuilderUtils.generateUniqueId());
+               titanDao.createVertex(catalogRootVertex);
+       }
+
     public static GraphVertex createResourceVertex(TitanDao titanDao, Map<GraphPropertyEnum,Object> metadataProps, ResourceTypeEnum type) {
         GraphVertex vertex = new GraphVertex();
         if (type == ResourceTypeEnum.VF) {