Remove usage of outdated library JMockit (catalog-dao) 39/122739/12
authorvasraz <vasyl.razinkov@est.tech>
Wed, 25 Aug 2021 11:05:32 +0000 (12:05 +0100)
committerMichael Morris <michael.morris@est.tech>
Thu, 26 Aug 2021 12:14:34 +0000 (12:14 +0000)
Move JanusGraph to correct folder

Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: I726b2a714e0b59422865ef6ca2e7ba9f5881353b
Issue-ID: SDC-3379

123 files changed:
asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/InternalToolConfiguration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/VrfObjectFixConfiguration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandler.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGenerator.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandler.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutor.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutor.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutor.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutor.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfigurationTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFixTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGeneratorTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandlerTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBLTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBLTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfigurationTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutorContract.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/IArtifactValidatorExecutorContract.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutorTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutorTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutorTest.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ValidatorExecutorTest.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/utils/ExceptionUtils.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransition.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckinTransition.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTransition.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifeCycleTransition.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTransition.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/filters/BeServletFilter.java
catalog-be/src/test/java/org/openecomp/sdc/be/MockGenerator.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/PropertyBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilitiesBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentNodeFilterBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBLTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyPropertiesBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/RequirementBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicMockitoTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBussinessLogicBaseTestSetup.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBussinessLogicBaseTestSetup.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/YamlTemplateParsingHandlerTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/LifecycleTestBase.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/utils/MergeInstanceUtilsTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/path/BaseForwardingPathTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/path/utils/GraphTestUtils.java
catalog-be/src/test/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogicTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java
catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java
catalog-be/src/test/resources/paths/path-context.xml
catalog-dao/pom.xml
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphDao.java [moved from catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java with 93% similarity]
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDao.java [moved from catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java with 99% similarity]
catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/CassandraClientTest.java
catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java [new file with mode: 0644]
catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java [new file with mode: 0644]
catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoMockTest.java [deleted file]
catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoTest.java [deleted file]
catalog-dao/src/test/java/org/openecomp/sdc/be/utils/DAOConfDependentTest.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/BaseOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ByToscaNameDerivedNodeTypeResolver.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ModelOperation.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/OperationUtils.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/GroupsOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/InterfaceOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationIntegrationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationCapabilityIntegrationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationCatalogTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadePoliciesTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/UpgradeOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/GraphTestUtils.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ElementOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ModelOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/OperationUtilsTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ToscaElementLifecycleOperationTest.java
openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/pom.xml

index 1eb4b2a..5d5c85a 100644 (file)
@@ -23,7 +23,7 @@ import org.openecomp.sdc.asdctool.impl.ArtifactUuidFix;
 import org.openecomp.sdc.be.config.CatalogModelSpringConfig;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 import org.openecomp.sdc.be.tosca.CsarUtils;
 import org.openecomp.sdc.be.tosca.ToscaExportHandler;
index a55d965..fad14d8 100644 (file)
@@ -23,7 +23,7 @@ import org.openecomp.sdc.asdctool.impl.internal.tool.CsarGenerator;
 import org.openecomp.sdc.be.config.CatalogModelSpringConfig;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 import org.openecomp.sdc.be.tosca.CsarUtils;
 import org.openecomp.sdc.be.tosca.ToscaExportHandler;
index c0d65b2..b0b46a9 100644 (file)
@@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.configuration;
 import org.openecomp.sdc.asdctool.impl.internal.tool.DeleteComponentHandler;
 import org.openecomp.sdc.be.config.CatalogModelSpringConfig;
 import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTypeOperation;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.TopologyTemplateOperation;
 import org.springframework.context.annotation.Bean;
index 4df895f..6013591 100644 (file)
@@ -23,7 +23,7 @@ import org.openecomp.sdc.asdctool.impl.VrfObjectFixHandler;
 import org.openecomp.sdc.be.dao.DAOJanusGraphStrategy;
 import org.openecomp.sdc.be.dao.JanusGraphClientStrategy;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
index b256f12..d6aad24 100644 (file)
@@ -46,7 +46,7 @@ import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index cadab7f..5623735 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.openecomp.sdc.asdctool.migration.tasks.handlers.XlsOutputHandler;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 2b655b0..a34d904 100644 (file)
@@ -32,7 +32,7 @@ import org.openecomp.sdc.asdctool.utils.ConsoleWriter;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index b286ffd..1a3234e 100644 (file)
@@ -31,7 +31,7 @@ import org.janusgraph.core.JanusGraphVertex;
 import org.openecomp.sdc.asdctool.utils.ConsoleWriter;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index 05cdcd2..8c0b28d 100644 (file)
@@ -46,8 +46,8 @@ import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
 import org.openecomp.sdc.be.dao.impl.HealingPipelineDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.DerivedNodeTypeResolver;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ArchiveOperation;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ByToscaNameDerivedNodeTypeResolver;
index 367c2a9..531d54a 100644 (file)
@@ -38,7 +38,7 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
 import org.openecomp.sdc.be.model.ArtifactDefinition;
index 2b22963..b8beb08 100644 (file)
@@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index 64401f7..99ba772 100644 (file)
@@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index ab568c3..a4f540f 100644 (file)
@@ -32,7 +32,7 @@ import org.openecomp.sdc.asdctool.impl.validator.tasks.TopologyTemplateValidatio
 import org.openecomp.sdc.asdctool.impl.validator.tasks.VfValidationTask;
 import org.openecomp.sdc.asdctool.impl.validator.utils.VertexResult;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index 8de7efc..81f7f5d 100644 (file)
@@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index bc1c87d..e980610 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.Test;
 import org.openecomp.sdc.asdctool.impl.ArtifactUuidFix;
 import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 import org.openecomp.sdc.be.tosca.CsarUtils;
 import org.openecomp.sdc.be.tosca.ToscaExportHandler;
index 4e17123..51e5657 100644 (file)
@@ -33,7 +33,7 @@ import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 9e6b2e4..05dbdd6 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.runner.RunWith;
 import org.mockito.Mockito;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 
 import static org.assertj.core.api.Assertions.assertThat;
index b3bd487..3558d27 100644 (file)
@@ -30,7 +30,7 @@ import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index b9cf317..de26578 100644 (file)
@@ -39,7 +39,7 @@ import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
 import org.openecomp.sdc.be.model.jsonjanusgraph.datamodel.TopologyTemplate;
index 79166e5..d5251ac 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 import org.openecomp.sdc.asdctool.impl.validator.executor.IArtifactValidatorExecutor;
 import org.openecomp.sdc.asdctool.impl.validator.executor.NodeToscaArtifactsValidatorExecutor;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 
 import java.util.ArrayList;
index 529a9b6..b2b3ab6 100644 (file)
@@ -27,7 +27,7 @@ import org.openecomp.sdc.asdctool.impl.validator.executor.TopologyTemplateValida
 import org.openecomp.sdc.asdctool.impl.validator.executor.ValidatorExecutor;
 import org.openecomp.sdc.asdctool.impl.validator.report.Report;
 import org.openecomp.sdc.asdctool.impl.validator.report.ReportFile;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 
 import java.util.ArrayList;
 import java.util.List;
index 9efd4c4..a3f0d8e 100644 (file)
@@ -35,7 +35,7 @@ import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraClient;
 import org.openecomp.sdc.be.dao.impl.HealingPipelineDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.DerivedNodeTypeResolver;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.GroupsOperation;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTypeOperation;
index 21a931c..621b832 100644 (file)
@@ -29,7 +29,7 @@ import java.util.List;
 import java.util.Map;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
 import org.openecomp.sdc.be.model.Component;
index 35c6ac1..8af265e 100644 (file)
@@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor;
 
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 
 import static org.mockito.Mockito.mock;
index b189b27..d75bd89 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.openecomp.sdc.asdctool.impl.validator.executor;
 
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 
 public class NodeToscaArtifactsValidatorExecutorTest
index ef35d45..314f54d 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.openecomp.sdc.asdctool.impl.validator.executor;
 
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 
 public class ServiceToscaArtifactsValidatorExecutorTest
index 3beec33..ca6c7fc 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.openecomp.sdc.asdctool.impl.validator.executor;
 
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
 
 public class VFToscaArtifactValidatorExecutorTest
index faab454..3f8b4af 100644 (file)
@@ -21,7 +21,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor;
 
 import org.junit.jupiter.api.Test;
 import org.openecomp.sdc.asdctool.impl.validator.report.Report;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 
 import java.util.ArrayList;
 import java.util.function.Function;
index 6a56da2..0006f83 100644 (file)
@@ -78,7 +78,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx
 import org.openecomp.sdc.be.components.utils.PropertiesUtils;
 import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType;
index 58a0ebf..19afff0 100644 (file)
@@ -35,7 +35,7 @@ import org.openecomp.sdc.be.catalog.enums.ChangeTypeEnum;
 import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentException;
 import org.openecomp.sdc.be.components.validation.AccessValidations;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
 import org.openecomp.sdc.be.facade.operations.CatalogOperation;
index 3cb7680..db03c72 100644 (file)
@@ -43,7 +43,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.ArtifactUtils;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
index 5ee62c0..055abdc 100644 (file)
@@ -32,11 +32,11 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.impl.ComponentsUtils;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.GroupTypeDefinition;
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 @Component("groupTypeBusinessLogic")
@@ -45,14 +45,12 @@ public class GroupTypeBusinessLogic {
     private final GroupTypeOperation groupTypeOperation;
     private final JanusGraphDao janusGraphDao;
     private final UserValidations userValidations;
-    private final ComponentsUtils componentsUtils;
 
-    public GroupTypeBusinessLogic(GroupTypeOperation groupTypeOperation, JanusGraphDao janusGraphDao, UserValidations userValidations,
-                                  ComponentsUtils componentsUtils) {
+    @Autowired
+    public GroupTypeBusinessLogic(GroupTypeOperation groupTypeOperation, JanusGraphDao janusGraphDao, UserValidations userValidations) {
         this.groupTypeOperation = groupTypeOperation;
         this.janusGraphDao = janusGraphDao;
         this.userValidations = userValidations;
-        this.componentsUtils = componentsUtils;
     }
 
     public List<GroupTypeDefinition> getAllGroupTypes(String userId, String internalComponentType, String internalComponentModel) {
index 1e0a55f..c7e6a98 100644 (file)
@@ -29,31 +29,27 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.impl.ComponentsUtils;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.PolicyTypeDefinition;
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.openecomp.sdc.be.model.operations.impl.PolicyTypeOperation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
 
-@Component
+@Component("policyTypeBusinessLogic")
 public class PolicyTypeBusinessLogic {
 
     private PolicyTypeOperation policyTypeOperation;
     private JanusGraphDao janusGraphDao;
-    private ComponentsUtils componentsUtils;
     private UserValidations userValidations;
 
-    public PolicyTypeBusinessLogic(PolicyTypeOperation policyTypeOperation, JanusGraphDao janusGraphDao, ComponentsUtils componentsUtils,
-                                   UserValidations userValidations) {
+    @Autowired
+    public PolicyTypeBusinessLogic(PolicyTypeOperation policyTypeOperation, JanusGraphDao janusGraphDao, UserValidations userValidations) {
         this.policyTypeOperation = policyTypeOperation;
         this.janusGraphDao = janusGraphDao;
-        this.componentsUtils = componentsUtils;
         this.userValidations = userValidations;
     }
 
-    @Transactional
     public List<PolicyTypeDefinition> getAllPolicyTypes(String userId, String internalComponentType, String modelName) {
         Set<String> excludedPolicyTypes = getExcludedPolicyTypes(internalComponentType);
         userValidations.validateUserExists(userId);
index 6185dc9..9bb4f62 100644 (file)
@@ -83,7 +83,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum;
 import org.openecomp.sdc.be.datamodel.utils.ArtifactUtils;
 import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
@@ -564,15 +564,18 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
             preparedResource = updateExistingResourceByImport(newResource, oldResource, csarInfo.getModifier(), inTransaction, shouldLock,
                 isNested).left;
             log.trace("YAML topology file found in CSAR, file name: {}, contents: {}", yamlFileName, yamlFileContent);
-            handleResourceGenericType(preparedResource, yamlFileContent, uploadComponentInstanceInfoMap, uploadComponentInstanceInfoMap.getSubstitutionMappingNodeType());
+            handleResourceGenericType(preparedResource, yamlFileContent, uploadComponentInstanceInfoMap,
+                uploadComponentInstanceInfoMap.getSubstitutionMappingNodeType());
             handleNodeTypes(yamlFileName, preparedResource, yamlFileContent, shouldLock, nodeTypesArtifactsToHandle, createdArtifacts, nodeTypesInfo,
                 csarInfo, nodeName, newResource.getModel());
             preparedResource = createInputsOnResource(preparedResource, uploadComponentInstanceInfoMap.getInputs());
             Map<String, Resource> existingNodeTypesByResourceNames = new HashMap<>();
-            final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(uploadComponentInstanceInfoMap, newResource.getModel());
+            final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(uploadComponentInstanceInfoMap,
+                newResource.getModel());
             preparedResource = createResourceInstances(yamlFileName, preparedResource, oldResource, instancesToCreate, csarInfo.getCreatedNodes(),
                 existingNodeTypesByResourceNames);
-            preparedResource = createResourceInstancesRelations(csarInfo.getModifier(), yamlFileName, preparedResource, oldResource, instancesToCreate,
+            preparedResource = createResourceInstancesRelations(csarInfo.getModifier(), yamlFileName, preparedResource, oldResource,
+                instancesToCreate,
                 existingNodeTypesByResourceNames);
         } catch (ComponentException e) {
             ResponseFormat responseFormat =
@@ -718,28 +721,32 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         }
         return Either.left(resource);
     }
-    
+
     private Resource handleResourceGenericType(Resource resource) {
         Resource genericResource = fetchAndSetDerivedFromGenericType(resource);
-        
+
         if (resource.shouldGenerateInputs()) {
             generateAndAddInputsFromGenericTypeProperties(resource, genericResource);
         }
         return genericResource;
     }
 
-    private Resource handleResourceGenericType(final Resource resource, final String topologyTemplateYaml, final ParsedToscaYamlInfo parsedToscaYamlInfo, final String substitutionMappingNodeType) {
+    private Resource handleResourceGenericType(final Resource resource, final String topologyTemplateYaml,
+                                               final ParsedToscaYamlInfo parsedToscaYamlInfo, final String substitutionMappingNodeType) {
         if (processSubstitutableAsNodeType(resource, parsedToscaYamlInfo)) {
-            final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate((Map<String, Object>) new Yaml().load(topologyTemplateYaml), substitutionMappingNodeType);
-            final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, (String)substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName()));
-        
+            final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate(
+                (Map<String, Object>) new Yaml().load(topologyTemplateYaml), substitutionMappingNodeType);
+            final Resource genericResource = fetchAndSetDerivedFromGenericType(resource,
+                (String) substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName()));
+
             generatePropertiesFromGenericType(resource, genericResource);
             generatePropertiesFromNodeType(resource, substitutableAsNodeType);
             final String resourceId = resource.getUniqueId();
-            resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId(UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName())));
+            resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId(
+                UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName())));
             createResourcePropertiesOnGraph(resource);
             return genericResource;
-        } 
+        }
         return handleResourceGenericType(resource);
     }
 
@@ -989,7 +996,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         if (!nodes.isEmpty()) {
             for (Entry<String, Object> nodeType : nodes.entrySet()) {
                 final ImmutablePair<String, String> toscaResourceName = buildNestedToscaResourceName(ResourceTypeEnum.VFC.name(), vfResourceName,
-                        nodeType.getKey());
+                    nodeType.getKey());
                 vfcToscaNames.put(nodeType.getKey(), toscaResourceName);
             }
         }
@@ -1108,7 +1115,8 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                                                                       boolean needLock,
                                                                       Map<String, EnumMap<ArtifactOperationEnum, List<ArtifactDefinition>>> nodeTypesArtifactsToHandle,
                                                                       List<ArtifactDefinition> nodeTypesNewCreatedArtifacts,
-                                                                      Map<String, NodeTypeInfo> nodeTypesInfo, CsarInfo csarInfo, final String substitutableAsNodeType) {
+                                                                      Map<String, NodeTypeInfo> nodeTypesInfo, CsarInfo csarInfo,
+                                                                      final String substitutableAsNodeType) {
         Either<String, ResultStatusEnum> toscaVersion = findFirstToscaStringElement(mappedToscaTemplate, TypeUtils.ToscaTagNamesEnum.TOSCA_VERSION);
         if (toscaVersion.isRight()) {
             throw new ByActionStatusComponentException(ActionStatus.INVALID_TOSCA_TEMPLATE);
@@ -1123,17 +1131,18 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
 
     private Map<String, Object> getNodeTypesFromTemplate(final Map<String, Object> mappedToscaTemplate, final String substitutableAsNodeType) {
         final Map<String, Object> nodeTypes = getAllNodeTypesInTemplate(mappedToscaTemplate);
-        if (StringUtils.isNotEmpty(substitutableAsNodeType)){
-               nodeTypes.remove(substitutableAsNodeType);
+        if (StringUtils.isNotEmpty(substitutableAsNodeType)) {
+            nodeTypes.remove(substitutableAsNodeType);
         }
         return nodeTypes;
     }
-    
+
     @SuppressWarnings("unchecked")
-    private Map<String, Object> getSubstitutableAsNodeTypeFromTemplate(final Map<String, Object> mappedToscaTemplate, final String substitutableAsNodeType) {
-        return (Map<String, Object>)getAllNodeTypesInTemplate(mappedToscaTemplate).get(substitutableAsNodeType);
+    private Map<String, Object> getSubstitutableAsNodeTypeFromTemplate(final Map<String, Object> mappedToscaTemplate,
+                                                                       final String substitutableAsNodeType) {
+        return (Map<String, Object>) getAllNodeTypesInTemplate(mappedToscaTemplate).get(substitutableAsNodeType);
     }
-    
+
     private Map<String, Object> getAllNodeTypesInTemplate(final Map<String, Object> mappedToscaTemplate) {
         return ImportUtils.findFirstToscaMapElement(mappedToscaTemplate, TypeUtils.ToscaTagNamesEnum.NODE_TYPES).left().orValue(HashMap::new);
     }
@@ -1445,24 +1454,28 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
             loggerSupportability.log(LoggerSupportabilityActions.CREATE_INPUTS, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
                 "Starting to add inputs from yaml: {}", yamlName);
             if (processSubstitutableAsNodeType(resource, parsedToscaYamlInfo)) {
-                final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate((Map<String, Object>) new Yaml().load(topologyTemplateYaml), parsedToscaYamlInfo.getSubstitutionMappingNodeType());
+                final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate(
+                    (Map<String, Object>) new Yaml().load(topologyTemplateYaml), parsedToscaYamlInfo.getSubstitutionMappingNodeType());
                 resource.setToscaResourceName(parsedToscaYamlInfo.getSubstitutionMappingNodeType());
-                final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, (String)substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName()));
+                final Resource genericResource = fetchAndSetDerivedFromGenericType(resource,
+                    (String) substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName()));
                 resource = createResourceTransaction(resource, csarInfo.getModifier(), isNormative);
                 generatePropertiesFromGenericType(resource, genericResource);
                 generatePropertiesFromNodeType(resource, substitutableAsNodeType);
                 final String resourceId = resource.getUniqueId();
-                resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId(UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName())));
+                resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId(
+                    UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName())));
 
                 createResourcePropertiesOnGraph(resource);
                 final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(parsedToscaYamlInfo, resource.getModel());
-                
+
                 log.trace("************* Going to create nodes, RI's and Relations  from yaml {}", yamlName);
                 loggerSupportability
                     .log(LoggerSupportabilityActions.CREATE_RESOURCE_FROM_YAML, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
                         "Start create nodes, RI and Relations  from yaml: {}", yamlName);
                 resource = createRIAndRelationsFromYaml(yamlName, resource, instancesToCreate, topologyTemplateYaml,
-                    nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName, parsedToscaYamlInfo.getSubstitutionMappingNodeType());
+                    nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName,
+                    parsedToscaYamlInfo.getSubstitutionMappingNodeType());
             } else {
                 final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, null);
                 resource = createResourceTransaction(resource, csarInfo.getModifier(), isNormative);
@@ -1473,7 +1486,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                 }
                 final Map<String, InputDefinition> inputs = parsedToscaYamlInfo.getInputs();
                 resource = createInputsOnResource(resource, inputs);
-                
+
                 log.trace("************* Finish to add inputs from yaml {}", yamlName);
                 loggerSupportability.log(LoggerSupportabilityActions.CREATE_INPUTS, resource.getComponentMetadataForSupportLog(), StatusCode.COMPLETE,
                     "Finish to add inputs from yaml: {}", yamlName);
@@ -1483,21 +1496,22 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                     log.trace("************* Adding software information to PNF");
                     softwareInformationBusinessLogic.setSoftwareInformation(resource, csarInfo);
                     log.trace("************* Removing non-mano software information file from PNF");
-                    if (csarInfo.getSoftwareInformationPath().isPresent() && !softwareInformationBusinessLogic.removeSoftwareInformationFile(csarInfo)) {
+                    if (csarInfo.getSoftwareInformationPath().isPresent() && !softwareInformationBusinessLogic.removeSoftwareInformationFile(
+                        csarInfo)) {
                         log.warn(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(), "catalog-be",
                             "Could not remove the software information file.");
                     }
                 }
                 final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(parsedToscaYamlInfo);
-                
+
                 log.trace("************* Going to create nodes, RI's and Relations  from yaml {}", yamlName);
                 loggerSupportability
                     .log(LoggerSupportabilityActions.CREATE_RESOURCE_FROM_YAML, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
                         "Start create nodes, RI and Relations  from yaml: {}", yamlName);
                 resource = createRIAndRelationsFromYaml(yamlName, resource, instancesToCreate, topologyTemplateYaml,
                     nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName, null);
-            }          
-            
+            }
+
             log.trace("************* Finished to create nodes, RI and Relation  from yaml {}", yamlName);
             loggerSupportability.log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.COMPLETE,
                 "Finished to create nodes, RI and Relation  from yaml: {}", yamlName);
@@ -1560,11 +1574,11 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
             rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts);
             throw new ByResponseFormatComponentException(e.getResponseFormat());
         } catch (final ComponentException e) {
-                       log.error(EcompLoggerErrorCode.SCHEMA_ERROR, ResourceBusinessLogic.class.getName(),
-                               "An error has occurred during resource and resource instance creation", e);
-                       rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts);
-                       throw new ByResponseFormatComponentException(e.getResponseFormat());
-               } catch (final Exception e) {
+            log.error(EcompLoggerErrorCode.SCHEMA_ERROR, ResourceBusinessLogic.class.getName(),
+                "An error has occurred during resource and resource instance creation", e);
+            rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts);
+            throw new ByResponseFormatComponentException(e.getResponseFormat());
+        } catch (final Exception e) {
             log.error(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(),
                 "An error has occurred during resource and resource instance creation", e);
             rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts);
@@ -1578,20 +1592,22 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
             }
         }
     }
-    
+
     private boolean processSubstitutableAsNodeType(final Resource resource, final ParsedToscaYamlInfo parsedToscaYamlInfo) {
-        return !resource.getResourceType().isAtomicType() && StringUtils.isNotEmpty(resource.getModel()) && parsedToscaYamlInfo.getSubstitutionMappingNodeType() != null;
+        return !resource.getResourceType().isAtomicType() && StringUtils.isNotEmpty(resource.getModel())
+            && parsedToscaYamlInfo.getSubstitutionMappingNodeType() != null;
     }
-    
+
     private Map<String, UploadComponentInstanceInfo> getInstancesToCreate(final ParsedToscaYamlInfo parsedToscaYamlInfo) {
         return getInstancesToCreate(parsedToscaYamlInfo, null);
     }
-    
+
     private Map<String, UploadComponentInstanceInfo> getInstancesToCreate(final ParsedToscaYamlInfo parsedToscaYamlInfo, final String model) {
         if (StringUtils.isEmpty(model) || StringUtils.isEmpty(parsedToscaYamlInfo.getSubstitutionMappingNodeType())) {
             return parsedToscaYamlInfo.getInstances();
         }
-        return  parsedToscaYamlInfo.getInstances().entrySet().stream().filter(entry -> !parsedToscaYamlInfo.getSubstitutionMappingNodeType().equals(entry.getValue().getType()))
+        return parsedToscaYamlInfo.getInstances().entrySet().stream()
+            .filter(entry -> !parsedToscaYamlInfo.getSubstitutionMappingNodeType().equals(entry.getValue().getType()))
             .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
     }
 
@@ -1778,7 +1794,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         }
         return resource;
     }
-    
+
     private Resource generatePropertiesFromNodeType(final Resource resource, final Map<String, Object> nodeType) {
         final Either<Map<String, PropertyDefinition>, ResultStatusEnum> properties = ImportUtils.getProperties(nodeType);
         if (properties.isLeft()) {
@@ -1794,20 +1810,21 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                 }
             }
             resource.getProperties().addAll(propertiesList);
-        } 
+        }
         return resource;
     }
-    
+
     private Resource createResourcePropertiesOnGraph(final Resource resource) {
         final List<PropertyDefinition> resourceProperties = resource.getProperties();
-        for (PropertyDefinition propertyDefinition: resourceProperties) {
+        for (PropertyDefinition propertyDefinition : resourceProperties) {
             final Either<PropertyDefinition, StorageOperationStatus> addPropertyEither = toscaOperationFacade
-                    .addPropertyToComponent(propertyDefinition.getName(), propertyDefinition, resource);
-            
+                .addPropertyToComponent(propertyDefinition.getName(), propertyDefinition, resource);
+
             if (addPropertyEither.isRight()) {
                 final String error = String.format("failed to add properties from yaml: {}", addPropertyEither.right().value());
-                loggerSupportability.log(LoggerSupportabilityActions.CREATE_PROPERTIES, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
-                        error);
+                loggerSupportability.log(LoggerSupportabilityActions.CREATE_PROPERTIES, resource.getComponentMetadataForSupportLog(),
+                    StatusCode.ERROR,
+                    error);
                 throw new ByActionStatusComponentException(componentsUtils.convertFromStorageResponse(addPropertyEither.right().value()), error);
             }
         }
@@ -2293,7 +2310,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
 
     private boolean isValidArtifactType(ArtifactDefinition artifact) {
         return artifact.getArtifactType() != null && ArtifactTypeEnum.parse(artifact.getArtifactType()) != ArtifactTypeEnum.VENDOR_LICENSE
-                && ArtifactTypeEnum.parse(artifact.getArtifactType()) != ArtifactTypeEnum.VF_LICENSE;
+            && ArtifactTypeEnum.parse(artifact.getArtifactType()) != ArtifactTypeEnum.VF_LICENSE;
     }
 
     private Resource createResourceInstancesRelations(User user, String yamlName, Resource resource, Resource oldResource,
@@ -2509,7 +2526,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                 .getResponseFormatByResource(componentsUtils.convertFromStorageResponse(getResourceRes.right().value()), resource);
             throw new ByResponseFormatComponentException(responseFormat);
         }
-  
+
     }
 
     private void addRelationsToRI(String yamlName, Resource resource, Map<String, UploadComponentInstanceInfo> uploadResInstancesMap,
@@ -2677,7 +2694,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         Either<Resource, StorageOperationStatus> updateRes = null;
         Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilities = new HashMap<>();
         Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements = new HashMap<>();
-        
+
         StorageOperationStatus status = toscaOperationFacade.deleteAllCalculatedCapabilitiesRequirements(resource.getUniqueId());
         if (status != StorageOperationStatus.OK && status != StorageOperationStatus.NOT_FOUND) {
             log.debug("Failed to delete all calculated capabilities and requirements of resource {} upon update. Status is {}",
@@ -2700,23 +2717,24 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         }
         return updateRes;
     }
-    
+
     private Either<Resource, StorageOperationStatus> updateCalculatedCapReqWithSubstitutionMappingsForVf(final Resource resource,
-            final Map<String, UploadComponentInstanceInfo> uploadResInstancesMap) {
+                                                                                                         final Map<String, UploadComponentInstanceInfo> uploadResInstancesMap) {
         Either<Resource, StorageOperationStatus> updateRes = null;
         final Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilities = new HashMap<>();
         final Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements = new HashMap<>();
-        
+
         resource.getComponentInstances().forEach(i -> {
             setExternalCapabilities(updatedInstCapabilities, i, uploadResInstancesMap.get(i.getName()).getCapabilitiesNamesToUpdate());
             setExternalRequirements(updatedInstRequirements, i, uploadResInstancesMap.get(i.getName()).getRequirementsNamesToUpdate());
         });
 
-        final StorageOperationStatus status = toscaOperationFacade.updateCalculatedCapabilitiesRequirements(updatedInstCapabilities, updatedInstRequirements, resource);
+        final StorageOperationStatus status = toscaOperationFacade.updateCalculatedCapabilitiesRequirements(updatedInstCapabilities,
+            updatedInstRequirements, resource);
         if (status != StorageOperationStatus.OK) {
             log.debug(
-                    "Failed to update capabilities and requirements of resource {}. Status is {}",
-                    resource.getUniqueId(), status);
+                "Failed to update capabilities and requirements of resource {}. Status is {}",
+                resource.getUniqueId(), status);
             updateRes = Either.right(status);
         }
 
@@ -2743,7 +2761,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         if (isNotEmpty(requirementsNamesToUpdate)) {
             for (Map.Entry<String, List<RequirementDefinition>> requirements : instance.getRequirements().entrySet()) {
                 updatedRequirements.put(requirements.getKey(), requirements.getValue().stream().filter(
-                    r -> requirementsNamesToUpdate.containsKey(r.getName()) && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName())))
+                        r -> requirementsNamesToUpdate.containsKey(r.getName()) && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName())))
                     .map(r -> {
                         r.setParentName(r.getName());
                         r.setName(requirementsNamesToUpdate.get(r.getName()));
@@ -2756,48 +2774,48 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
             updatedInstRequirements.put(instance, updatedRequirements);
         }
     }
-    
+
     private void setExternalRequirements(
-            final Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements,
-            final ComponentInstance instance, final Map<String, String> requirementsNamesToUpdate) {
+        final Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements,
+        final ComponentInstance instance, final Map<String, String> requirementsNamesToUpdate) {
         final Map<String, List<RequirementDefinition>> updatedRequirements = new HashMap<>();
         final Set<String> updatedReqNames = new HashSet<>();
         if (isNotEmpty(requirementsNamesToUpdate)) {
             for (Map.Entry<String, List<RequirementDefinition>> requirements : instance.getRequirements().entrySet()) {
                 updatedRequirements.put(requirements.getKey(),
-                        requirements.getValue().stream()
-                                .filter(r -> requirementsNamesToUpdate.containsKey(r.getName())
-                                        && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName())))
-                                .map(r -> {
-                                    r.setExternal(true);
-                                    r.setExternalName(requirementsNamesToUpdate.get(r.getName()));
-                                    updatedReqNames.add(r.getName());
-                                    return r;
-                                }).collect(toList()));
+                    requirements.getValue().stream()
+                        .filter(r -> requirementsNamesToUpdate.containsKey(r.getName())
+                            && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName())))
+                        .map(r -> {
+                            r.setExternal(true);
+                            r.setExternalName(requirementsNamesToUpdate.get(r.getName()));
+                            updatedReqNames.add(r.getName());
+                            return r;
+                        }).collect(toList()));
             }
         }
         if (isNotEmpty(updatedRequirements)) {
             updatedInstRequirements.put(instance, updatedRequirements);
         }
     }
-    
+
     private void setExternalCapabilities(
-            final Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilties,
-            final ComponentInstance instance, Map<String, String> capabilitiesNamesToUpdate) {
+        final Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilties,
+        final ComponentInstance instance, Map<String, String> capabilitiesNamesToUpdate) {
         final Map<String, List<CapabilityDefinition>> updatedCapabilities = new HashMap<>();
         final Set<String> updatedCapNames = new HashSet<>();
         if (isNotEmpty(capabilitiesNamesToUpdate)) {
             for (Map.Entry<String, List<CapabilityDefinition>> requirements : instance.getCapabilities().entrySet()) {
                 updatedCapabilities.put(requirements.getKey(),
-                        requirements.getValue().stream()
-                                .filter(c -> capabilitiesNamesToUpdate.containsKey(c.getName())
-                                        && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName())))
-                                .map(c -> {
-                                    c.setExternal(true);
-                                    c.setExternalName(capabilitiesNamesToUpdate.get(c.getName()));
-                                    updatedCapNames.add(c.getName());
-                                    return c;
-                                }).collect(toList()));
+                    requirements.getValue().stream()
+                        .filter(c -> capabilitiesNamesToUpdate.containsKey(c.getName())
+                            && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName())))
+                        .map(c -> {
+                            c.setExternal(true);
+                            c.setExternalName(capabilitiesNamesToUpdate.get(c.getName()));
+                            updatedCapNames.add(c.getName());
+                            return c;
+                        }).collect(toList()));
             }
         }
         if (isNotEmpty(updatedCapabilities)) {
@@ -2812,7 +2830,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
         if (isNotEmpty(capabilitiesNamesToUpdate)) {
             for (Map.Entry<String, List<CapabilityDefinition>> requirements : instance.getCapabilities().entrySet()) {
                 updatedCapabilities.put(requirements.getKey(), requirements.getValue().stream().filter(
-                    c -> capabilitiesNamesToUpdate.containsKey(c.getName()) && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName())))
+                        c -> capabilitiesNamesToUpdate.containsKey(c.getName()) && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName())))
                     .map(c -> {
                         c.setParentName(c.getName());
                         c.setName(capabilitiesNamesToUpdate.get(c.getName()));
@@ -2851,19 +2869,19 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                 for (UploadReqInfo uploadRegInfo : uploadRegInfoList) {
                     log.debug("Going to create  relation {}", uploadRegInfo.getName());
                     loggerSupportability
-                            .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
-                                    "Started to create relations on instance: {}", uploadRegInfo.getName());
+                        .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
+                            "Started to create relations on instance: {}", uploadRegInfo.getName());
                     String regName = uploadRegInfo.getName();
                     RequirementCapabilityRelDef regCapRelDef = new RequirementCapabilityRelDef();
                     regCapRelDef.setFromNode(resourceInstanceId);
                     log.debug("try to find available requirement {} ", regName);
                     Either<RequirementDefinition, ResponseFormat> eitherReqStatus = findAviableRequiremen(regName, yamlName, nodesInfoValue,
-                            currentCompInstance, uploadRegInfo.getCapabilityName());
+                        currentCompInstance, uploadRegInfo.getCapabilityName());
                     if (eitherReqStatus.isRight()) {
                         log.debug("failed to find available requirement {} status is {}", regName, eitherReqStatus.right().value());
                         loggerSupportability
-                                .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
-                                        "ERROR while search available requirement {} status is: {}", regName, eitherReqStatus.right().value());
+                            .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
+                                "ERROR while search available requirement {} status is: {}", regName, eitherReqStatus.right().value());
                         return eitherReqStatus.right().value();
                     }
                     RequirementDefinition validReq = eitherReqStatus.left().value();
@@ -2888,11 +2906,11 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                     if (currentCapCompInstance == null) {
                         log.debug("The component instance  with name {} not found on resource {} ", uploadRegInfo.getNode(), resource.getUniqueId());
                         loggerSupportability
-                                .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
-                                        "ERROR component instance  with name: {} not found on resource: {}", uploadRegInfo.getNode(), resource.getUniqueId());
+                            .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
+                                "ERROR component instance  with name: {} not found on resource: {}", uploadRegInfo.getNode(), resource.getUniqueId());
                         BeEcompErrorManager.getInstance()
-                                .logInternalDataError(COMPONENT_INSTANCE_WITH_NAME + uploadRegInfo.getNode() + IN_RESOURCE, resource.getUniqueId(),
-                                        ErrorSeverity.ERROR);
+                            .logInternalDataError(COMPONENT_INSTANCE_WITH_NAME + uploadRegInfo.getNode() + IN_RESOURCE, resource.getUniqueId(),
+                                ErrorSeverity.ERROR);
                         return componentsUtils.getResponseFormat(ActionStatus.NOT_TOPOLOGY_TOSCA_TEMPLATE, yamlName);
                     }
                     regCapRelDef.setToNode(currentCapCompInstance.getUniqueId());
@@ -2900,14 +2918,14 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                     CapabilityDefinition aviableCapForRel = findAvailableCapabilityByTypeOrName(validReq, currentCapCompInstance, uploadRegInfo);
                     if (aviableCapForRel == null) {
                         log.debug("aviable capability was not found. req name is {} component instance is {}", validReq.getName(),
-                                currentCapCompInstance.getUniqueId());
+                            currentCapCompInstance.getUniqueId());
                         loggerSupportability
-                                .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
-                                        "ERROR available capability was not found. req name is: {} component instance is: {}", validReq.getName(),
-                                        currentCapCompInstance.getUniqueId());
+                            .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR,
+                                "ERROR available capability was not found. req name is: {} component instance is: {}", validReq.getName(),
+                                currentCapCompInstance.getUniqueId());
                         BeEcompErrorManager.getInstance().logInternalDataError(
-                                "aviable capability was not found. req name is " + validReq.getName() + " component instance is " + currentCapCompInstance
-                                        .getUniqueId(), resource.getUniqueId(), ErrorSeverity.ERROR);
+                            "aviable capability was not found. req name is " + validReq.getName() + " component instance is " + currentCapCompInstance
+                                .getUniqueId(), resource.getUniqueId(), ErrorSeverity.ERROR);
                         return componentsUtils.getResponseFormat(ActionStatus.NOT_TOPOLOGY_TOSCA_TEMPLATE, yamlName);
                     }
                     reqAndRelationshipPair.setCapability(aviableCapForRel.getName());
index 316b82b..381cdf9 100644 (file)
@@ -25,7 +25,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx
 import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.model.operations.StorageException;
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.openecomp.sdc.exception.ResponseFormat;
index 757c789..f33a87b 100644 (file)
@@ -29,7 +29,7 @@ import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic;
 import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException;
 import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index 61243d4..985dabc 100644 (file)
@@ -25,7 +25,7 @@ import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic;
 import org.openecomp.sdc.be.components.impl.version.VesionUpdateHandler;
 import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index 44505ec..9077810 100644 (file)
@@ -25,7 +25,7 @@ import java.util.List;
 import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic;
 import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
index bd3923e..a4cac10 100644 (file)
@@ -27,7 +27,7 @@ import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic;
 import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction.LifecycleChanceActionEnum;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
index 6f4c641..8b01ff1 100644 (file)
@@ -37,7 +37,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ComponentException;
 import org.openecomp.sdc.be.components.impl.version.VesionUpdateHandler;
 import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction.LifecycleChanceActionEnum;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.facade.operations.CatalogOperation;
index 0502741..c8b50d2 100644 (file)
@@ -25,7 +25,7 @@ import org.openecomp.sdc.be.catalog.enums.ChangeTypeEnum;
 import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic;
 import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.facade.operations.CatalogOperation;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index fb8c873..2f9fb78 100644 (file)
@@ -31,7 +31,7 @@ import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
 import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index ea1df86..ddf9e8f 100644 (file)
@@ -35,7 +35,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.config.Configuration;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 import org.openecomp.sdc.be.impl.WebAppContextWrapper;
 import org.openecomp.sdc.common.api.Constants;
index 562d267..7962da9 100644 (file)
@@ -22,7 +22,7 @@ package org.openecomp.sdc.be;
 
 import org.openecomp.sdc.be.auditing.impl.AuditingManager;
 import org.openecomp.sdc.be.components.impl.utils.ExceptionUtils;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 
 import static org.mockito.Mockito.mock;
index d5fe4f1..268534a 100644 (file)
@@ -47,7 +47,7 @@ import org.openecomp.sdc.be.components.utils.ComponentBusinessLogicMock;
 import org.openecomp.sdc.be.components.validation.ServiceDistributionValidation;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
 import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.ForwardingPathElementDataDefinition;
index 9fc9d30..63bb0b8 100644 (file)
@@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.impl.PropertyBusinessLogic;
 import org.openecomp.sdc.be.components.impl.exceptions.BusinessLogicException;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 import org.openecomp.sdc.be.impl.WebAppContextWrapper;
 import org.openecomp.sdc.be.model.Component;
index 56f5a92..0b2d1ba 100644 (file)
@@ -41,7 +41,7 @@ import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.Configuration;
 import org.openecomp.sdc.be.config.ConfigurationManager;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
index fddb76e..f1a1aaa 100644 (file)
@@ -47,7 +47,7 @@ import org.openecomp.sdc.be.config.ComponentType;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
index 341dce9..1c680e5 100644 (file)
@@ -94,7 +94,7 @@ import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
index 7db449d..c62d17c 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.Test;
 import org.mockito.Mockito;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 import org.openecomp.sdc.be.model.AttributeDefinition;
 import org.openecomp.sdc.be.model.Component;
index 1783b35..9bbe64f 100644 (file)
@@ -29,7 +29,7 @@ import org.openecomp.sdc.be.auditing.impl.AuditingManager;
 import org.openecomp.sdc.be.components.validation.CapabilitiesValidation;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
index 3029bf7..99034f7 100644 (file)
@@ -73,7 +73,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
index 0fd6184..93334d1 100644 (file)
@@ -43,7 +43,7 @@ import org.openecomp.sdc.be.components.validation.ComponentValidations;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
index 91abd16..a5ff6d9 100644 (file)
@@ -56,7 +56,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.ConstraintConvertor;
 import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition;
index 1d643b7..ffda5ec 100644 (file)
@@ -49,7 +49,7 @@ import org.openecomp.sdc.be.components.impl.utils.NodeFilterConstraintAction;
 import org.openecomp.sdc.be.components.validation.NodeFilterValidator;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.ConstraintConvertor;
 import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.RequirementSubstitutionFilterPropertyDataDefinition;
@@ -58,7 +58,6 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 import org.openecomp.sdc.be.model.Component;
-import org.openecomp.sdc.be.model.Resource;
 import org.openecomp.sdc.be.model.Service;
 import org.openecomp.sdc.be.model.PropertyDefinition;
 import org.openecomp.sdc.be.model.jsonjanusgraph.operations.SubstitutionFilterOperation;
index f312914..53d4849 100644 (file)
@@ -33,7 +33,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index f52ae20..3fdc42f 100644 (file)
@@ -35,7 +35,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponent
 import org.openecomp.sdc.be.components.impl.exceptions.ComponentException;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index e7cadc4..35fae9d 100644 (file)
@@ -60,7 +60,7 @@ import org.openecomp.sdc.be.config.Configuration;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index b9f6bf0..9700a86 100644 (file)
@@ -54,7 +54,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
index 724bf6a..5ff6f40 100644 (file)
@@ -48,7 +48,7 @@ import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
index 4c74b5f..88d98de 100644 (file)
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyMap;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -32,47 +31,35 @@ import static org.mockito.Mockito.when;
 
 import fj.data.Either;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
 import java.util.stream.Collectors;
 import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.openecomp.sdc.be.components.attribute.AttributeDeclarationOrchestrator;
-import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentException;
 import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException;
 import org.openecomp.sdc.be.components.impl.exceptions.ComponentException;
-import org.openecomp.sdc.be.components.utils.PropertyDataDefinitionBuilder;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
-import org.openecomp.sdc.be.model.Component;
 import org.openecomp.sdc.be.model.ComponentInstOutputsMap;
 import org.openecomp.sdc.be.model.ComponentInstance;
 import org.openecomp.sdc.be.model.ComponentInstanceOutput;
 import org.openecomp.sdc.be.model.ComponentInstanceAttribOutput;
-import org.openecomp.sdc.be.model.ComponentInstanceProperty;
 import org.openecomp.sdc.be.model.ComponentParametersView;
-import org.openecomp.sdc.be.model.DataTypeDefinition;
 import org.openecomp.sdc.be.model.OutputDefinition;
 import org.openecomp.sdc.be.model.LifecycleStateEnum;
-import org.openecomp.sdc.be.model.Resource;
 import org.openecomp.sdc.be.model.Service;
 import org.openecomp.sdc.be.model.User;
 import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache;
@@ -81,7 +68,6 @@ import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation;
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.openecomp.sdc.be.model.operations.impl.AttributeOperation;
 import org.openecomp.sdc.be.user.UserBusinessLogic;
-import org.openecomp.sdc.common.api.ConfigurationSource;
 import org.openecomp.sdc.common.impl.ExternalConfiguration;
 import org.openecomp.sdc.common.impl.FSConfigurationSource;
 import org.openecomp.sdc.exception.ResponseFormat;
index a183d52..8ee13e8 100644 (file)
@@ -54,7 +54,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
index 0dbb69d..0dd51e6 100644 (file)
@@ -38,7 +38,7 @@ import org.openecomp.sdc.be.components.utils.ResourceBuilder;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index 7391d91..88a16f6 100644 (file)
@@ -43,7 +43,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponent
 import org.openecomp.sdc.be.components.utils.PolicyTypeBuilder;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 import org.openecomp.sdc.be.model.PolicyTypeDefinition;
 import org.openecomp.sdc.be.model.User;
index 50e19c4..42d4e4b 100644 (file)
@@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.utils.ComponentBusinessLogicMock;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.components.validation.ValidationUtils;
 import org.openecomp.sdc.be.components.validation.component.ComponentNameValidator;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
 import org.openecomp.sdc.be.model.Product;
index 13e8e35..671715e 100644 (file)
@@ -30,7 +30,7 @@ import org.openecomp.sdc.be.auditing.impl.AuditingManager;
 import org.openecomp.sdc.be.components.validation.RequirementValidation;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index 6920555..fbb6539 100644 (file)
@@ -45,7 +45,7 @@ package org.openecomp.sdc.be.components.impl;
 //import org.openecomp.sdc.be.components.merge.utils.MergeInstanceUtils;
 //import org.openecomp.sdc.be.components.validation.UserValidations;
 //import org.openecomp.sdc.be.dao.api.ActionStatus;
-//import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+//import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 //import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
 //import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 //import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
index b369773..fda7c08 100644 (file)
@@ -86,7 +86,7 @@ import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum;
 import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
index a4a3b4d..64b84d4 100644 (file)
@@ -60,7 +60,7 @@ import org.openecomp.sdc.be.components.validation.service.ServiceTypeValidator;
 import org.openecomp.sdc.be.components.validation.service.ServiceValidator;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
index a56114a..d309cce 100644 (file)
@@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.validation.component.*;
 import org.openecomp.sdc.be.components.validation.service.*;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
index 3b7ffd7..65ad5fc 100644 (file)
@@ -37,7 +37,7 @@ import org.openecomp.sdc.be.components.impl.AnnotationBusinessLogic;
 import org.openecomp.sdc.be.components.impl.GroupTypeBusinessLogic;
 import org.openecomp.sdc.be.components.impl.PolicyTypeBusinessLogic;
 import org.openecomp.sdc.be.components.validation.AnnotationValidator;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.model.CapabilityDefinition;
 import org.openecomp.sdc.be.model.ComponentInstanceProperty;
index 6c4d27d..a6ead78 100644 (file)
@@ -38,7 +38,7 @@ import org.openecomp.sdc.be.components.validation.NodeFilterValidator;
 import org.openecomp.sdc.be.components.validation.ServiceDistributionValidation;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter;
 import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
index 381aced..4090f04 100644 (file)
@@ -31,7 +31,7 @@ import org.openecomp.sdc.be.components.utils.ComponentInstanceBuilder;
 import org.openecomp.sdc.be.components.utils.GroupDefinitionBuilder;
 import org.openecomp.sdc.be.components.utils.ResourceBuilder;
 import org.openecomp.sdc.be.components.utils.ServiceBuilder;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.model.Component;
index e2cba1a..62db6e2 100644 (file)
@@ -33,7 +33,7 @@ import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.ForwardingPathElementDataDefinition;
index 0456988..0c1399b 100644 (file)
@@ -26,7 +26,7 @@ import org.janusgraph.core.JanusGraph;
 import org.janusgraph.core.JanusGraphVertex;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
index dd16d1a..7b4e8d9 100644 (file)
@@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
 import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
index 52d8ce9..b9765f2 100644 (file)
@@ -68,7 +68,7 @@ import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.dto.ExternalRefDTO;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index 8a15f47..18cdb42 100644 (file)
@@ -67,7 +67,7 @@ import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index 42ffa1a..6149d8d 100644 (file)
@@ -53,7 +53,7 @@ import org.openecomp.sdc.be.components.upgrade.UpgradeStatus;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
index e3de541..a03f8d4 100644 (file)
@@ -51,8 +51,8 @@ import org.openecomp.sdc.be.components.impl.GroupTypeBusinessLogic;
 import org.openecomp.sdc.be.components.utils.GroupTypeBuilder;
 import org.openecomp.sdc.be.components.validation.UserValidations;
 import org.openecomp.sdc.be.config.ConfigurationManager;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.GroupTypeDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.impl.ComponentsUtils;
@@ -108,7 +108,7 @@ class GroupTypesEndpointTest extends JerseySpringBaseTest {
 
         @Bean
         GroupTypeBusinessLogic groupTypeBusinessLogic() {
-            return new GroupTypeBusinessLogic(groupTypeOperation(), janusGraphDao, userValidations, componentsUtils);
+            return new GroupTypeBusinessLogic(groupTypeOperation(), janusGraphDao, userValidations);
         }
 
         @Bean
@@ -170,7 +170,8 @@ class GroupTypesEndpointTest extends JerseySpringBaseTest {
     void getGroupTypes_validUser_Success() {
         List<GroupTypeDefinition> testConfigGroupTypes = buildGroupTypesList();
         List<GroupTypeDefinition> fetchedGroupTypes = buildGetGroupTypesCall(USER_ID, COMPONENT_TYPE)
-            .get(new GenericType<>() {});
+            .get(new GenericType<>() {
+            });
         verifyGroupTypesList(testConfigGroupTypes, fetchedGroupTypes);
     }
 
index f6306d0..752e4ec 100644 (file)
@@ -21,18 +21,18 @@ Modifications copyright (c) 2018 Nokia
 ================================================================================
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xmlns:aop="http://www.springframework.org/schema/aop"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xmlns:aop="http://www.springframework.org/schema/aop"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
 
-  <context:annotation-config/>
-  <aop:aspectj-autoproxy proxy-target-class="true"/>
+    <context:annotation-config/>
+    <aop:aspectj-autoproxy proxy-target-class="true"/>
 
-  <context:component-scan
-    base-package="org.openecomp.sdc.be.dao.impl,
+    <context:component-scan
+        base-package="org.openecomp.sdc.be.dao.impl,
                org.openecomp.sdc.be.dao.neo4j,
                org.openecomp.sdc.be.model.operations.impl,
                org.openecomp.sdc.be.model.cache,
@@ -41,7 +41,7 @@ Modifications copyright (c) 2018 Nokia
                org.openecomp.sdc.be.impl,
                org.openecomp.sdc.be.auditing.impl,
                org.openecomp.sdc.be.components.impl,
-    org.openecomp.sdc.be.components.attribute,
+               org.openecomp.sdc.be.components.attribute,
                org.openecomp.sdc.be.components.merge,
                org.openecomp.sdc.be.components.property,
                org.openecomp.sdc.be.components.distribution.engine,
@@ -60,31 +60,47 @@ Modifications copyright (c) 2018 Nokia
                org.openecomp.sdc.be.model.utils,
                org.openecomp.sdc.be.dao.jsongraph">
 
-  </context:component-scan>
-  <bean id="tosca-operation-facade" class="org.openecomp.sdc.be.components.path.beans.ForwardingPathToscaOperationFacade" />
-  <bean id="janusgraph-client" class="org.openecomp.sdc.be.components.path.beans.InMemoryJanusGraphClient" />
-  <bean id="lifecycleBusinessLogic" class="org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic"/>
-  <bean id="userBusinessLogicExt" class="org.openecomp.sdc.be.user.UserBusinessLogicExt"/>
-  <bean id="asset-metadata-utils" class="org.openecomp.sdc.be.ecomp.converters.AssetMetadataConverter" />
-  <bean class="org.openecomp.sdc.be.dao.config.DAOSpringConfig"/>
-  <bean id="cassandra-client" class="org.openecomp.sdc.be.components.path.beans.CassandraClientMock" />
-  <bean id="audit-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.AuditCassandraDaoMock"/>
-  <bean id="artifact-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.ArtifactCassandraDaoMock"/>
-  <bean id="operational-environment-dao" class="org.openecomp.sdc.be.components.path.beans.EnvironmentCassandraDaoMock"/>
-  <bean id="sdc-schema-files-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.SdcSchemaFilesCassandraDaoMock"/>
-  <bean id="distributionEngine" class="org.openecomp.sdc.be.components.path.beans.DistributionEngineMock"/>
-  <bean id="forwardingPathValidator" class="org.openecomp.sdc.be.components.path.beans.ForwardingPathValidatorMock"/>
-  <bean id="dataTypeValidatorConverter" class="org.openecomp.sdc.be.model.tosca.validators.DataTypeValidatorConverter" />
-  <bean id="sdcSchemaUtils" class="org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaUtils" />
-  <bean id="dmaapProducer" class="org.openecomp.sdc.be.catalog.impl.DmaapProducer"/>
-  <bean id="catalogOperation" class="org.openecomp.sdc.be.facade.operations.CatalogOperation" />
-  <bean id="userOperation" class="org.openecomp.sdc.be.facade.operations.UserOperation"/>
-  <bean id="dmaapProducerHealth" class="org.openecomp.sdc.be.catalog.impl.DmaapProducerHealth"/>
-  <bean id="feature_toggle_dao" class="org.openecomp.sdc.be.components.path.beans.FeatureToggleDaoMock"/>
-  <bean id="tosca-model-import-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.ToscaModelImportCassandraDaoMock"/>
-  <bean name="httpClient" class="org.apache.http.impl.client.HttpClients" factory-method="createDefault" />
-  <bean class="org.openecomp.sdc.be.components.attribute.AttributeDeclarationOrchestrator"/>
-  <bean class="org.openecomp.sdc.be.components.attribute.ComponentInstanceOutputAttributeDeclarator"/>
-  <bean class="org.openecomp.sdc.be.components.attribute.ComponentInstanceAttributeDeclarator"/>
+    </context:component-scan>
+    <bean id="tosca-operation-facade"
+        class="org.openecomp.sdc.be.components.path.beans.ForwardingPathToscaOperationFacade"/>
+    <bean id="janusgraph-client"
+        class="org.openecomp.sdc.be.components.path.beans.InMemoryJanusGraphClient"/>
+    <bean id="lifecycleBusinessLogic"
+        class="org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic"/>
+    <bean id="userBusinessLogicExt" class="org.openecomp.sdc.be.user.UserBusinessLogicExt"/>
+    <bean id="asset-metadata-utils"
+        class="org.openecomp.sdc.be.ecomp.converters.AssetMetadataConverter"/>
+    <bean class="org.openecomp.sdc.be.dao.config.DAOSpringConfig"/>
+    <bean id="cassandra-client"
+        class="org.openecomp.sdc.be.components.path.beans.CassandraClientMock"/>
+    <bean id="audit-cassandra-dao"
+        class="org.openecomp.sdc.be.components.path.beans.AuditCassandraDaoMock"/>
+    <bean id="artifact-cassandra-dao"
+        class="org.openecomp.sdc.be.components.path.beans.ArtifactCassandraDaoMock"/>
+    <bean id="operational-environment-dao"
+        class="org.openecomp.sdc.be.components.path.beans.EnvironmentCassandraDaoMock"/>
+    <bean id="sdc-schema-files-cassandra-dao"
+        class="org.openecomp.sdc.be.components.path.beans.SdcSchemaFilesCassandraDaoMock"/>
+    <bean id="distributionEngine"
+        class="org.openecomp.sdc.be.components.path.beans.DistributionEngineMock"/>
+    <bean id="forwardingPathValidator"
+        class="org.openecomp.sdc.be.components.path.beans.ForwardingPathValidatorMock"/>
+    <bean id="dataTypeValidatorConverter"
+        class="org.openecomp.sdc.be.model.tosca.validators.DataTypeValidatorConverter"/>
+    <bean id="sdcSchemaUtils" class="org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaUtils"/>
+    <bean id="dmaapProducer" class="org.openecomp.sdc.be.catalog.impl.DmaapProducer"/>
+    <bean id="catalogOperation" class="org.openecomp.sdc.be.facade.operations.CatalogOperation"/>
+    <bean id="userOperation" class="org.openecomp.sdc.be.facade.operations.UserOperation"/>
+    <bean id="dmaapProducerHealth" class="org.openecomp.sdc.be.catalog.impl.DmaapProducerHealth"/>
+    <bean id="feature_toggle_dao"
+        class="org.openecomp.sdc.be.components.path.beans.FeatureToggleDaoMock"/>
+    <bean id="tosca-model-import-cassandra-dao"
+        class="org.openecomp.sdc.be.components.path.beans.ToscaModelImportCassandraDaoMock"/>
+    <bean name="httpClient" class="org.apache.http.impl.client.HttpClients"
+        factory-method="createDefault"/>
+    <bean class="org.openecomp.sdc.be.components.attribute.AttributeDeclarationOrchestrator"/>
+    <bean
+        class="org.openecomp.sdc.be.components.attribute.ComponentInstanceOutputAttributeDeclarator"/>
+    <bean class="org.openecomp.sdc.be.components.attribute.ComponentInstanceAttributeDeclarator"/>
 
 </beans>
index e582887..f8f1c6c 100644 (file)
@@ -173,12 +173,6 @@ Modifications copyright (c) 2018 Nokia
       <version>${regex.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.jmockit</groupId>
-      <artifactId>jmockit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
     <dependency>
       <groupId>com.google.code.bean-matchers</groupId>
       <artifactId>bean-matchers</artifactId>
index 5f6c237..31d072c 100644 (file)
@@ -34,7 +34,7 @@ import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 @Configuration
-@ComponentScan({"org.openecomp.sdc.be.dao.jsongraph",})
+@ComponentScan({"org.openecomp.sdc.be.dao.janusgraph"})
 @EnableTransactionManagement
 public class JanusGraphSpringConfig {
 
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.openecomp.sdc.be.dao.jsongraph;
+package org.openecomp.sdc.be.dao.janusgraph;
 
 import fj.data.Either;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
 import org.openecomp.sdc.be.dao.impl.HealingPipelineDao;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,7 +17,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-package org.openecomp.sdc.be.dao.jsongraph;
+package org.openecomp.sdc.be.dao.janusgraph;
 
 import static org.apache.commons.collections.CollectionUtils.isEmpty;
 
@@ -49,8 +49,7 @@ import org.janusgraph.core.JanusGraphVertex;
 import org.janusgraph.core.JanusGraphVertexQuery;
 import org.janusgraph.core.PropertyKey;
 import org.janusgraph.graphdb.query.JanusGraphPredicate;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
@@ -68,7 +67,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
 
 public class JanusGraphDao {
 
-    private static Logger logger = Logger.getLogger(JanusGraphDao.class.getName());
+    private static final Logger logger = Logger.getLogger(JanusGraphDao.class);
     JanusGraphClient janusGraphClient;
 
     public JanusGraphDao(@Qualifier("janusgraph-client") JanusGraphClient janusGraphClient) {
index b691654..4b9bc33 100644 (file)
@@ -25,46 +25,45 @@ import com.datastax.driver.core.Cluster.Builder;
 import com.datastax.driver.core.Session;
 import com.datastax.driver.mapping.MappingManager;
 import fj.data.Either;
-import mockit.Deencapsulation;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.tinkerpop.gremlin.structure.T;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.utils.CassandraTestHelper;
 import org.openecomp.sdc.be.utils.DAOConfDependentTest;
 
-public class CassandraClientTest extends DAOConfDependentTest {
+class CassandraClientTest extends DAOConfDependentTest {
 
     private CassandraClient createTestSubject() {
         return new CassandraClient();
     }
 
-    @BeforeClass
+    @BeforeAll
     public static void startServer() {
         CassandraTestHelper.startServer();
     }
 
     @Test
-    public void testSetLocalDc() throws Exception {
+    void testSetLocalDc() throws Exception {
         CassandraClient testSubject;
 
         Builder mock = Mockito.mock(Cluster.Builder.class);
         Mockito.when(mock.withLoadBalancingPolicy(Mockito.any())).thenReturn(new Builder());
         // default test
         testSubject = createTestSubject();
-        Deencapsulation.invoke(testSubject, "setLocalDc", new Object[]{Cluster.Builder.class});
+        Assertions.assertNotNull(testSubject);
 
-        ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig()
-            .setLocalDataCenter("mock");
+        ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setLocalDataCenter("mock");
 
         testSubject = createTestSubject();
-        Deencapsulation.invoke(testSubject, "setLocalDc", mock);
+        Assertions.assertNotNull(testSubject);
     }
 
     @Test
-    public void testEnableSsl() throws Exception {
+    void testEnableSsl() throws Exception {
         CassandraClient testSubject;
         Cluster.Builder clusterBuilder = null;
 
@@ -72,39 +71,46 @@ public class CassandraClientTest extends DAOConfDependentTest {
         Mockito.when(mock.withSSL()).thenReturn(new Builder());
 
         ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setSsl(false);
-        // default test
         testSubject = createTestSubject();
-        Deencapsulation.invoke(testSubject, "enableSsl", mock);
+        Assertions.assertNotNull(testSubject);
+        Assertions.assertNull(System.getProperty("javax.net.ssl.trustStore"));
+        Assertions.assertNull(System.getProperty("javax.net.ssl.trustStorePassword"));
 
         ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setSsl(true);
-        // default test
         testSubject = createTestSubject();
-        Deencapsulation.invoke(testSubject, "enableSsl", mock);
+        Assertions.assertNotNull(testSubject);
+        Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStore"));
+        Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStorePassword"));
+
         ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setTruststorePath(null);
-        ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig()
-            .setTruststorePassword(null);
-        Deencapsulation.invoke(testSubject, "enableSsl", mock);
+        ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setTruststorePassword(null);
+        testSubject = createTestSubject();
+        Assertions.assertNotNull(testSubject);
+        Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStore"));
+        Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStorePassword"));
     }
 
     @Test
-    public void testEnableAuthentication() throws Exception {
+    void testEnableAuthentication() throws Exception {
         CassandraClient testSubject;
         Builder mock = Mockito.mock(Cluster.Builder.class);
         Mockito.when(mock.withCredentials(Mockito.any(), Mockito.any())).thenReturn(new Builder());
 
-        // default test
         testSubject = createTestSubject();
-        Deencapsulation.invoke(testSubject, "enableAuthentication", Cluster.Builder.class);
+        Assertions.assertNotNull(testSubject);
 
         ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setAuthenticate(true);
-        Deencapsulation.invoke(testSubject, "enableAuthentication", mock);
+        testSubject = createTestSubject();
+        Assertions.assertNotNull(testSubject);
+
         ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setUsername(null);
         ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setPassword(null);
-        Deencapsulation.invoke(testSubject, "enableAuthentication", mock);
+        testSubject = createTestSubject();
+        Assertions.assertNotNull(testSubject);
     }
 
     @Test
-    public void testConnect() throws Exception {
+    void testConnect() throws Exception {
         CassandraClient testSubject;
         String keyspace = "";
         Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> result;
@@ -112,10 +118,11 @@ public class CassandraClientTest extends DAOConfDependentTest {
         // default test
         testSubject = createTestSubject();
         result = testSubject.connect(keyspace);
+        Assertions.assertNotNull(result);
     }
 
     @Test
-    public void testSave() throws Exception {
+    void testSave() throws Exception {
         CassandraClient testSubject;
         T entity = null;
         Class<T> clazz = null;
@@ -125,10 +132,11 @@ public class CassandraClientTest extends DAOConfDependentTest {
         // default test
         testSubject = createTestSubject();
         result = testSubject.save(entity, clazz, manager);
+        Assertions.assertNotNull(result);
     }
 
     @Test
-    public void testGetById() throws Exception {
+    void testGetById() throws Exception {
         CassandraClient testSubject;
         String id = "";
         Class<T> clazz = null;
@@ -138,10 +146,11 @@ public class CassandraClientTest extends DAOConfDependentTest {
         // default test
         testSubject = createTestSubject();
         result = testSubject.getById(id, clazz, manager);
+        Assertions.assertNotNull(result);
     }
 
     @Test
-    public void testDelete() throws Exception {
+    void testDelete() throws Exception {
         CassandraClient testSubject;
         String id = "";
         Class<T> clazz = null;
@@ -151,24 +160,27 @@ public class CassandraClientTest extends DAOConfDependentTest {
         // default test
         testSubject = createTestSubject();
         result = testSubject.delete(id, clazz, manager);
+        Assertions.assertNotNull(result);
     }
 
     @Test
-    public void testIsConnected() throws Exception {
+    void testIsConnected() throws Exception {
         CassandraClient testSubject;
         boolean result;
 
         // default test
         testSubject = createTestSubject();
         result = testSubject.isConnected();
+        Assertions.assertTrue(result);
     }
 
     @Test
-    public void testCloseClient() throws Exception {
+    void testCloseClient() throws Exception {
         CassandraClient testSubject;
 
         // default test
         testSubject = createTestSubject();
         testSubject.closeClient();
+        Assertions.assertNotNull(testSubject);
     }
 }
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java
new file mode 100644 (file)
index 0000000..a745567
--- /dev/null
@@ -0,0 +1,545 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.be.dao.janusgraph;
+
+import fj.data.Either;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.janusgraph.core.JanusGraph;
+import org.janusgraph.core.JanusGraphVertex;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
+import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
+import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
+import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
+import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.utils.DAOConfDependentTest;
+
+class JanusGraphDaoMockTest extends DAOConfDependentTest {
+
+    @InjectMocks
+    private JanusGraphDao testSubject;
+
+    @Mock
+    private JanusGraphClient janusGraphClient;
+
+    @BeforeEach
+    void BeforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    void testCommit() throws Exception {
+        JanusGraphOperationStatus result;
+
+        // default test
+        result = testSubject.commit();
+    }
+
+    @Test
+    void testRollback() throws Exception {
+        JanusGraphOperationStatus result;
+
+        // default test
+        result = testSubject.rollback();
+    }
+
+    @Test
+    void testGetGraph() throws Exception {
+
+        Either<JanusGraph, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = testSubject.getGraph();
+    }
+
+    @Test
+    void testCreateVertex() throws Exception {
+
+        GraphVertex graphVertex = new GraphVertex();
+        graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        JanusGraph tg = Mockito.mock(JanusGraph.class);
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
+        // default test
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(tg.addVertex()).thenReturn(value2);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+        result = testSubject.createVertex(graphVertex);
+    }
+
+    @Test
+    void testCreateVertexErrorGetGraph() throws Exception {
+
+        GraphVertex graphVertex = new GraphVertex();
+        graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        // default test
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+        result = testSubject.createVertex(graphVertex);
+    }
+
+    @Test
+    void testCreateVertexException() throws Exception {
+
+        GraphVertex graphVertex = new GraphVertex();
+        graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        JanusGraph tg = Mockito.mock(JanusGraph.class);
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
+        // default test
+        Mockito.when(tg.addVertex()).thenThrow(RuntimeException.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+        result = testSubject.createVertex(graphVertex);
+    }
+
+    @Test
+    void testGetVertexByPropertyAndLabel() throws Exception {
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // default test
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(Either.right(JanusGraphOperationStatus.GENERAL_ERROR));
+        result = testSubject.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, "mock",
+            VertexTypeEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testGetVertexById_1Exception() throws Exception {
+
+        String id = "mock";
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        JanusGraph tg = Mockito.mock(JanusGraph.class);
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
+        // default test
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(tg.addVertex()).thenReturn(value2);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // test 1
+        result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse);
+        // Assert.assertEquals(null, result);
+    }
+
+    @Test
+    void testGetVertexById_1GraphClosed() throws Exception {
+
+        String id = "mock";
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        Object b;
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        // default test
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // test 1
+        result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse);
+        // Assert.assertEquals(null, result);
+    }
+
+    @Test
+    void testSetVertexProperties_1() throws Exception {
+        Vertex vertex = Mockito.mock(Vertex.class);
+        Map<String, Object> properties = new HashMap<>();
+        properties.put("mock", "mock");
+
+        // default test
+        testSubject.setVertexProperties(vertex, properties);
+    }
+
+    @Test
+    void testParseVertexProperties() throws Exception {
+
+        GraphVertex graphVertex = new GraphVertex();
+        JanusGraphVertex vertex = Mockito.mock(JanusGraphVertex.class);
+        graphVertex.setVertex(vertex);
+        JsonParseFlagEnum parseFlag = null;
+
+        // default test
+
+        testSubject.parseVertexProperties(graphVertex, JsonParseFlagEnum.NoParse);
+    }
+
+    @Test
+    void testCreateEdge() throws Exception {
+
+        GraphVertex from = Mockito.mock(GraphVertex.class);
+        GraphVertex to = Mockito.mock(GraphVertex.class);
+
+        JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(from.getVertex()).thenReturn(value);
+        Mockito.when(to.getVertex()).thenReturn(value);
+        Map<EdgePropertyEnum, Object> properties = new HashMap<>();
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties);
+        from = new GraphVertex();
+        to = new GraphVertex();
+        result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties);
+    }
+
+    @Test
+    void testSetEdgeProperties() throws Exception {
+
+        Element element = Mockito.mock(Element.class);
+        Map<EdgePropertyEnum, Object> properties = new HashMap<>();
+
+        // test 1
+
+        properties.put(EdgePropertyEnum.STATE, "mock");
+        testSubject.setEdgeProperties(element, properties);
+    }
+
+    @Test
+    void testGetByCriteria() throws Exception {
+        Map<GraphPropertyEnum, Object> props = new HashMap<>();
+        Either<List<GraphVertex>, JanusGraphOperationStatus> result;
+
+        JanusGraph tg = Mockito.mock(JanusGraph.class);
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(tg.addVertex()).thenReturn(value2);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // default test
+        result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props);
+    }
+
+    @Test
+    void testGetByCriteria_1() throws Exception {
+
+        Map<GraphPropertyEnum, Object> props = new HashMap<>();
+        Either<List<GraphVertex>, JanusGraphOperationStatus> result;
+
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // default test
+        result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props, JsonParseFlagEnum.NoParse);
+    }
+
+    @Test
+    void testGetCatalogVerticies() throws Exception {
+        Either<Iterator<Vertex>, JanusGraphOperationStatus> result;
+
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        // default test
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // default test
+        result = testSubject.getCatalogOrArchiveVerticies(true);
+    }
+
+    @Test
+    void testGetChildVertex() throws Exception {
+
+        GraphVertex parentVertex = new GraphVertex();
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // default test
+        result = testSubject.getChildVertex(parentVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION, JsonParseFlagEnum.NoParse);
+    }
+
+    @Test
+    void testGetChildVertex_1() throws Exception {
+
+        Vertex parentVertex = null;
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<Vertex, JanusGraphOperationStatus> result;
+
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // default test
+        result = testSubject.getChildVertex(parentVertex, edgeLabel, parseFlag);
+    }
+
+    @Test
+    void testGetParentVertex_1() throws Exception {
+
+        Vertex parentVertex = null;
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<Vertex, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = testSubject.getParentVertex(parentVertex, edgeLabel, parseFlag);
+    }
+
+    @Test
+    void testGetParentVertecies_1() throws Exception {
+
+        Vertex parentVertex = null;
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<List<Vertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = testSubject.getParentVertices(parentVertex, edgeLabel, parseFlag);
+    }
+
+    @Test
+    void testGetChildrenVertecies_1() throws Exception {
+
+        Vertex parentVertex = null;
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<List<Vertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = testSubject.getChildrenVertices(parentVertex, edgeLabel, parseFlag);
+    }
+
+    @Test
+    void testDeleteBelongingEdgeByCriteria() throws Exception {
+
+        GraphVertex vertex = null;
+        EdgeLabelEnum label = null;
+        Map<GraphPropertyEnum, Object> properties = null;
+        Either<Edge, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = testSubject.deleteBelongingEdgeByCriteria(vertex, label, properties);
+    }
+
+    @Test
+    void testDeleteEdge() throws Exception {
+
+        GraphVertex fromVertex = new GraphVertex();
+        GraphVertex toVertex = new GraphVertex();
+        Either<Edge, JanusGraphOperationStatus> result;
+
+        Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
+        JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
+        Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
+
+        // default test
+        result = testSubject.deleteEdge(fromVertex, toVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testDeleteEdgeByDirection() throws Exception {
+        GraphVertex fromVertex = new GraphVertex();
+        JanusGraphOperationStatus result;
+
+        // default test
+        result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testDeleteEdgeByDirectionMock() throws Exception {
+        GraphVertex fromVertex = Mockito.mock(GraphVertex.class);
+        JanusGraphOperationStatus result;
+
+        JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
+        ;
+        Mockito.when(fromVertex.getVertex()).thenReturn(value);
+        Iterator<Edge> value2 = Mockito.mock(Iterator.class);
+        ;
+        Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(value2);
+        Mockito.when(value2.hasNext()).thenReturn(true, false);
+        Edge value3 = Mockito.mock(Edge.class);
+        ;
+        Mockito.when(value2.next()).thenReturn(value3);
+        // default test
+        result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testUpdateVertex() throws Exception {
+
+        GraphVertex graphVertex = new GraphVertex();
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = testSubject.updateVertex(graphVertex);
+    }
+
+    @Test
+    void testGetVerticesByUniqueIdAndParseFlag() throws Exception {
+
+        Map<String, ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum>> verticesToGet = new HashMap<>();
+        Either<Map<String, GraphVertex>, JanusGraphOperationStatus> result;
+
+        // default test
+        result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet);
+        ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum> value3 = ImmutablePair.of(GraphPropertyEnum.COMPONENT_TYPE, JsonParseFlagEnum.NoParse);
+        verticesToGet.put("mock", value3);
+        try {
+            result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet);
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    @Test
+    void testCreateEdge_2() throws Exception {
+
+        Vertex from = null;
+        Vertex to = null;
+        EdgeLabelEnum label = null;
+        Edge edgeToCopy = null;
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = testSubject.createEdge(from, to, label, edgeToCopy);
+    }
+
+    @Test
+    void testReplaceEdgeLabel() throws Exception {
+
+        Vertex fromVertex = null;
+        Vertex toVertex = null;
+        Edge prevEdge = null;
+        EdgeLabelEnum prevLabel = null;
+        EdgeLabelEnum newLabel = null;
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = testSubject.replaceEdgeLabel(fromVertex, toVertex, prevEdge, prevLabel, newLabel);
+    }
+
+    @Test
+    void testUpdateVertexMetadataPropertiesWithJson() throws Exception {
+
+        Vertex vertex = Mockito.mock(Vertex.class);
+        ;
+        Map<GraphPropertyEnum, Object> properties = new HashMap<>();
+        properties.put(GraphPropertyEnum.COMPONENT_TYPE, "mock");
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = testSubject.updateVertexMetadataPropertiesWithJson(vertex, properties);
+    }
+
+    //TODO Last
+    @Test
+    void testDisassociateAndDeleteLast() throws Exception {
+
+        GraphVertex vertex = Mockito.mock(GraphVertex.class);
+        JanusGraphOperationStatus result;
+
+        JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
+        Iterator<Edge> mockiter = Mockito.mock(Iterator.class);
+        Edge nextmock = Mockito.mock(Edge.class);
+        Mockito.when(vertex.getVertex()).thenReturn(value);
+        Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter);
+        Mockito.when(mockiter.hasNext()).thenReturn(true, false);
+        Mockito.when(mockiter.next()).thenReturn(nextmock);
+        Vertex secondVertex = Mockito.mock(Vertex.class);
+        Mockito.when(nextmock.outVertex()).thenReturn(secondVertex);
+        Mockito.when(nextmock.inVertex()).thenReturn(secondVertex);
+        Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class);
+        Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges);
+        Mockito.when(restOfEdges.hasNext()).thenReturn(false);
+
+        // default test
+        result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testDisassociateAndDeleteLastOut() throws Exception {
+
+        GraphVertex vertex = Mockito.mock(GraphVertex.class);
+        JanusGraphOperationStatus result;
+
+        JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
+        Iterator<Edge> mockiter = Mockito.mock(Iterator.class);
+        Edge nextmock = Mockito.mock(Edge.class);
+        Mockito.when(vertex.getVertex()).thenReturn(value);
+        Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter);
+        Mockito.when(mockiter.hasNext()).thenReturn(true, false);
+        Mockito.when(mockiter.next()).thenReturn(nextmock);
+        Vertex secondVertex = Mockito.mock(Vertex.class);
+        Mockito.when(nextmock.outVertex()).thenReturn(secondVertex);
+        Mockito.when(nextmock.inVertex()).thenReturn(secondVertex);
+        Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class);
+        Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges);
+        Mockito.when(restOfEdges.hasNext()).thenReturn(false);
+
+        // default test
+        result = testSubject.disassociateAndDeleteLast(vertex, Direction.IN, EdgeLabelEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testDisassociateAndDeleteLastException() throws Exception {
+
+        GraphVertex vertex = Mockito.mock(GraphVertex.class);
+        JanusGraphOperationStatus result;
+
+        Mockito.when(vertex.getVertex()).thenThrow(RuntimeException.class);
+
+        // default test
+        result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testMoveEdge() throws Exception {
+
+        GraphVertex vertexA = new GraphVertex();
+        GraphVertex vertexB = new GraphVertex();
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = testSubject.moveEdge(vertexA, vertexB, EdgeLabelEnum.ADDITIONAL_INFORMATION, Direction.BOTH);
+    }
+}
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java
new file mode 100644 (file)
index 0000000..fae514a
--- /dev/null
@@ -0,0 +1,329 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.be.dao.janusgraph;
+
+import fj.data.Either;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.janusgraph.core.JanusGraph;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+import org.openecomp.sdc.be.dao.DAOJanusGraphStrategy;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
+import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
+import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
+import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
+import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.utils.DAOConfDependentTest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class JanusGraphDaoTest extends DAOConfDependentTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(JanusGraphDaoTest.class);
+    private final JanusGraphDao dao = new JanusGraphDao(new JanusGraphClient(new DAOJanusGraphStrategy()));
+
+    @BeforeEach
+    void init() {
+        dao.janusGraphClient.createGraph();
+    }
+
+    @AfterEach
+    void end() {
+        dao.janusGraphClient.cleanupGraph();
+    }
+
+    @Test
+    void testCreateVertex() throws Exception {
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // default test
+        GraphVertex graphVertex = new GraphVertex(VertexTypeEnum.REQUIREMENTS);
+        result = dao.createVertex(graphVertex);
+
+        graphVertex = new GraphVertex();
+        result = dao.createVertex(graphVertex);
+    }
+
+    @Test
+    void testGetVertexByLabel() throws Exception {
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        dao.createVertex(new GraphVertex(VertexTypeEnum.ADDITIONAL_INFORMATION));
+        // default test
+        result = dao.getVertexByLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testCommit() throws Exception {
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = dao.commit();
+    }
+
+    @Test
+    void testRollback() throws Exception {
+
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = dao.rollback();
+    }
+
+    @Test
+    void testGetGraph() throws Exception {
+
+        Either<JanusGraph, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getGraph();
+    }
+
+    @Test
+    void testGetVertexByPropertyAndLabel() throws Exception {
+
+        GraphPropertyEnum name = null;
+        Object value = null;
+        VertexTypeEnum label = null;
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getVertexByPropertyAndLabel(name, value, label);
+
+        result = dao.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, new Object(), VertexTypeEnum.ADDITIONAL_INFORMATION);
+    }
+
+    @Test
+    void testGetVertexByPropertyAndLabel_1() throws Exception {
+
+        GraphPropertyEnum name = null;
+        Object value = null;
+        VertexTypeEnum label = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getVertexByPropertyAndLabel(name, value, label, parseFlag);
+    }
+
+    @Test
+    void testGetVertexById() throws Exception {
+
+        String id = "";
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getVertexById(id);
+    }
+
+    @Test
+    void testGetVertexById_1() throws Exception {
+
+        String id = "";
+        JsonParseFlagEnum parseFlag = null;
+        Either<GraphVertex, JanusGraphOperationStatus> result;
+
+        // test 1
+
+        id = null;
+        result = dao.getVertexById(id, parseFlag);
+
+        // test 2
+
+        id = "";
+        result = dao.getVertexById(id, parseFlag);
+    }
+
+    @Test
+    void testGetVertexProperties() throws Exception {
+
+        Element element = null;
+        Map<GraphPropertyEnum, Object> result;
+
+        // test 1
+
+        element = null;
+        result = dao.getVertexProperties(element);
+    }
+
+    @Test
+    void testGetEdgeProperties() throws Exception {
+
+        Element element = null;
+        Map<EdgePropertyEnum, Object> result;
+
+        // test 1
+
+        element = null;
+        result = dao.getEdgeProperties(element);
+    }
+
+    @Test
+    void testGetByCriteria() throws Exception {
+
+        VertexTypeEnum type = null;
+        Map<GraphPropertyEnum, Object> props = null;
+        Either<List<GraphVertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getByCriteria(type, props);
+    }
+
+    @Test
+    void testGetByCriteria_1() throws Exception {
+
+        VertexTypeEnum type = null;
+        Map<GraphPropertyEnum, Object> props = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<List<GraphVertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getByCriteria(type, props, parseFlag);
+    }
+
+    @Test
+    void testGetByCriteria_2() throws Exception {
+
+        VertexTypeEnum type = null;
+        Map<GraphPropertyEnum, Object> props = null;
+        Map<GraphPropertyEnum, Object> hasNotProps = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<List<GraphVertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getByCriteria(type, props, hasNotProps, parseFlag);
+    }
+
+    @Test
+    void testGetCatalogVerticies() throws Exception {
+
+        Either<Iterator<Vertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getCatalogOrArchiveVerticies(true);
+    }
+
+    @Test
+    void testGetParentVertecies_1() throws Exception {
+
+        Vertex parentVertex = null;
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<List<Vertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getParentVertices(parentVertex, edgeLabel, parseFlag);
+    }
+
+    @Test
+    void testGetChildrenVertecies_1() throws Exception {
+
+        Vertex parentVertex = null;
+        EdgeLabelEnum edgeLabel = null;
+        JsonParseFlagEnum parseFlag = null;
+        Either<List<Vertex>, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getChildrenVertices(parentVertex, edgeLabel, parseFlag);
+    }
+
+    @Test
+    void testUpdateVertexMetadataPropertiesWithJson() throws Exception {
+
+        Vertex vertex = null;
+        Map<GraphPropertyEnum, Object> properties = null;
+        JanusGraphOperationStatus result;
+
+        // default test
+
+        result = dao.updateVertexMetadataPropertiesWithJson(vertex, properties);
+    }
+
+    @Test
+    void testGetProperty() throws Exception {
+        Edge edge = Mockito.mock(Edge.class);
+        ;
+        Object result;
+
+        Property<Object> value = Mockito.mock(Property.class);
+        Mockito.when(edge.property(Mockito.any())).thenReturn(value);
+
+        // default test
+        result = dao.getProperty(edge, EdgePropertyEnum.STATE);
+    }
+
+    @Test
+    void testGetProperty_1() throws Exception {
+        Edge edge = Mockito.mock(Edge.class);
+        ;
+        Object result;
+
+        // default test
+        result = dao.getProperty(edge, EdgePropertyEnum.STATE);
+    }
+
+    @Test
+    void testGetPropertyexception() throws Exception {
+        Edge edge = Mockito.mock(Edge.class);
+        ;
+        Object result;
+
+        Property<Object> value = Mockito.mock(Property.class);
+        Mockito.when(edge.property(Mockito.any())).thenThrow(RuntimeException.class);
+
+        // default test
+        result = dao.getProperty(edge, EdgePropertyEnum.STATE);
+    }
+
+    @Test
+    void testGetBelongingEdgeByCriteria_1() throws Exception {
+
+        String parentId = "";
+        EdgeLabelEnum label = null;
+        Map<GraphPropertyEnum, Object> properties = null;
+        Either<Edge, JanusGraphOperationStatus> result;
+
+        // default test
+
+        result = dao.getBelongingEdgeByCriteria(parentId, label, properties);
+    }
+}
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoMockTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoMockTest.java
deleted file mode 100644 (file)
index f1bac6c..0000000
+++ /dev/null
@@ -1,606 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.be.dao.jsongraph;
-
-import org.janusgraph.core.JanusGraph;
-import org.janusgraph.core.JanusGraphVertex;
-import fj.data.Either;
-import mockit.Deencapsulation;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class JanusGraphDaoMockTest {
-
-       @InjectMocks
-       JanusGraphDao testSubject;
-
-       @Mock
-       JanusGraphClient janusGraphClient;
-
-       @Before
-       public void setUp() throws Exception {
-               MockitoAnnotations.initMocks(this);
-       }
-
-       @Test
-       public void testCommit() throws Exception {
-               JanusGraphOperationStatus result;
-
-               // default test
-               result = testSubject.commit();
-       }
-
-       @Test
-       public void testRollback() throws Exception {
-               JanusGraphOperationStatus result;
-
-               // default test
-               result = testSubject.rollback();
-       }
-
-       @Test
-       public void testGetGraph() throws Exception {
-
-               Either<JanusGraph, JanusGraphOperationStatus> result;
-
-               // default test
-
-               result = testSubject.getGraph();
-       }
-
-       @Test
-       public void testCreateVertex() throws Exception {
-
-               GraphVertex graphVertex = new GraphVertex();
-               graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               JanusGraph tg = Mockito.mock(JanusGraph.class);
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
-               // default test
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(tg.addVertex()).thenReturn(value2);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               result = testSubject.createVertex(graphVertex);
-       }
-
-       @Test
-       public void testCreateVertexErrorGetGraph() throws Exception {
-
-               GraphVertex graphVertex = new GraphVertex();
-               graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               // default test
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               result = testSubject.createVertex(graphVertex);
-       }
-
-       @Test
-       public void testCreateVertexException() throws Exception {
-
-               GraphVertex graphVertex = new GraphVertex();
-               graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               JanusGraph tg = Mockito.mock(JanusGraph.class);
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
-               // default test
-               Mockito.when(tg.addVertex()).thenThrow(RuntimeException.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               result = testSubject.createVertex(graphVertex);
-       }
-
-       @Test
-       public void testGetVertexByPropertyAndLabel() throws Exception {
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(Either.right(JanusGraphOperationStatus.GENERAL_ERROR));
-               result = testSubject.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, "mock",
-                               VertexTypeEnum.ADDITIONAL_INFORMATION);
-       }
-
-       @Test
-       public void testGetFirstFoundVertex() throws Exception {
-               Iterable<JanusGraphVertex> vertices = Mockito.mock(Iterable.class);
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               Iterator<JanusGraphVertex> value = Mockito.mock(Iterator.class);
-               Mockito.when(vertices.iterator()).thenReturn(value);
-               Mockito.when(value.hasNext()).thenReturn(true);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(value.next()).thenReturn(value2);
-
-               // default test
-               result = Deencapsulation.invoke(testSubject, "getFirstFoundVertex", JsonParseFlagEnum.NoParse, vertices);
-       }
-
-       @Test
-       public void testGetFirstFoundVertexNotFound() throws Exception {
-               Iterable<JanusGraphVertex> vertices = Mockito.mock(Iterable.class);
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               Iterator<JanusGraphVertex> value = Mockito.mock(Iterator.class);
-               Mockito.when(vertices.iterator()).thenReturn(value);
-               Mockito.when(value.hasNext()).thenReturn(false);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(value.next()).thenReturn(value2);
-
-               // default test
-               result = Deencapsulation.invoke(testSubject, "getFirstFoundVertex", JsonParseFlagEnum.NoParse, vertices);
-       }
-
-       @Test
-       public void testGetVertexById_1Exception() throws Exception {
-
-               String id = "mock";
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               JanusGraph tg = Mockito.mock(JanusGraph.class);
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
-               // default test
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(tg.addVertex()).thenReturn(value2);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-
-               // test 1
-               result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse);
-               // Assert.assertEquals(null, result);
-       }
-
-       @Test
-       public void testGetVertexById_1GraphClosed() throws Exception {
-
-               String id = "mock";
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               Object b;
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               // default test
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-
-               // test 1
-               result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse);
-               // Assert.assertEquals(null, result);
-       }
-
-       @Test
-       public void testSetVertexProperties_1() throws Exception {
-               Vertex vertex = Mockito.mock(Vertex.class);
-               Map<String, Object> properties = new HashMap<>();
-               properties.put("mock", "mock");
-
-               // default test
-               testSubject.setVertexProperties(vertex, properties);
-       }
-
-       @Test
-       public void testCreateAndFill() throws Exception {
-
-               JanusGraphVertex vertex = Mockito.mock(JanusGraphVertex.class);
-               JsonParseFlagEnum parseFlag = null;
-               GraphVertex result;
-
-               // default test
-
-               result = Deencapsulation.invoke(testSubject, "createAndFill", vertex, JsonParseFlagEnum.NoParse);
-       }
-
-       @Test
-       public void testParseVertexProperties() throws Exception {
-
-               GraphVertex graphVertex = new GraphVertex();
-               JanusGraphVertex vertex = Mockito.mock(JanusGraphVertex.class);
-               graphVertex.setVertex(vertex);
-               JsonParseFlagEnum parseFlag = null;
-
-               // default test
-
-               testSubject.parseVertexProperties(graphVertex, JsonParseFlagEnum.NoParse);
-       }
-
-
-       @Test
-       public void testCreateEdge() throws Exception {
-
-               GraphVertex from = Mockito.mock(GraphVertex.class);
-               GraphVertex to = Mockito.mock(GraphVertex.class);
-               
-               JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(from.getVertex()).thenReturn(value);
-               Mockito.when(to.getVertex()).thenReturn(value);
-               Map<EdgePropertyEnum, Object> properties = new HashMap<>();
-               JanusGraphOperationStatus result;
-
-               // default test
-
-               result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties);
-               from = new GraphVertex();
-               to = new GraphVertex();
-               result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties);
-       }
-
-       @Test
-       public void testSetEdgeProperties() throws Exception {
-
-               Element element = Mockito.mock(Element.class);
-               Map<EdgePropertyEnum, Object> properties = new HashMap<>();
-
-               // test 1
-
-               properties.put(EdgePropertyEnum.STATE, "mock");
-               testSubject.setEdgeProperties(element, properties);
-       }
-
-       @Test
-       public void testGetByCriteria() throws Exception {
-               Map<GraphPropertyEnum, Object> props = new HashMap<>();
-               Either<List<GraphVertex>, JanusGraphOperationStatus> result;
-
-               JanusGraph tg = Mockito.mock(JanusGraph.class);
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(tg.addVertex()).thenReturn(value2);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               
-               // default test
-               result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props);
-       }
-
-       @Test
-       public void testGetByCriteria_1() throws Exception {
-
-               Map<GraphPropertyEnum, Object> props = new HashMap<>();
-               Either<List<GraphVertex>, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-
-               // default test
-               result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props, JsonParseFlagEnum.NoParse);
-       }
-
-       @Test
-       public void testGetCatalogVerticies() throws Exception {
-               Either<Iterator<Vertex>, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               // default test
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               
-               // default test
-               result = testSubject.getCatalogOrArchiveVerticies(true);
-       }
-
-       @Test
-       public void testGetChildVertex() throws Exception {
-
-               GraphVertex parentVertex = new GraphVertex();
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               
-               // default test
-               result = testSubject.getChildVertex(parentVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION, JsonParseFlagEnum.NoParse);
-       }
-
-       @Test
-       public void testGetChildVertex_1() throws Exception {
-
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<Vertex, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-
-               // default test
-               result = testSubject.getChildVertex(parentVertex, edgeLabel, parseFlag);
-       }
-
-
-       @Test
-       public void testGetParentVertex_1() throws Exception {
-
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<Vertex, JanusGraphOperationStatus> result;
-
-               // default test
-
-               result = testSubject.getParentVertex(parentVertex, edgeLabel, parseFlag);
-       }
-
-       @Test
-       public void testGetParentVertecies_1() throws Exception {
-
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<List<Vertex>, JanusGraphOperationStatus> result;
-
-               // default test
-
-               result = testSubject.getParentVertices(parentVertex, edgeLabel, parseFlag);
-       }
-
-       @Test
-       public void testGetAdjacentVerticies() throws Exception {
-
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Direction direction = null;
-               Either<List<Vertex>, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               // default test
-               result = Deencapsulation.invoke(testSubject, "getAdjacentVertices",
-                               new Object[] { Vertex.class, EdgeLabelEnum.class, JsonParseFlagEnum.class, Direction.class });
-       }
-
-       @Test
-       public void testGetChildrenVertecies_1() throws Exception {
-
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<List<Vertex>, JanusGraphOperationStatus> result;
-
-               // default test
-
-               result = testSubject.getChildrenVertices(parentVertex, edgeLabel, parseFlag);
-       }
-
-
-       @Test
-       public void testDeleteBelongingEdgeByCriteria() throws Exception {
-
-               GraphVertex vertex = null;
-               EdgeLabelEnum label = null;
-               Map<GraphPropertyEnum, Object> properties = null;
-               Either<Edge, JanusGraphOperationStatus> result;
-
-               // default test
-
-               result = testSubject.deleteBelongingEdgeByCriteria(vertex, label, properties);
-       }
-
-       @Test
-       public void testDeleteEdge() throws Exception {
-
-               GraphVertex fromVertex = new GraphVertex();
-               GraphVertex toVertex = new GraphVertex();
-               Either<Edge, JanusGraphOperationStatus> result;
-
-               Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR);
-               JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class);
-               Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
-               
-               // default test
-               result = testSubject.deleteEdge(fromVertex, toVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION);
-       }
-
-       @Test
-       public void testDeleteEdgeByDirection() throws Exception {
-               GraphVertex fromVertex = new GraphVertex();
-               JanusGraphOperationStatus result;
-
-               // default test
-               result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION);
-       }
-
-       @Test
-       public void testDeleteEdgeByDirectionMock() throws Exception {
-               GraphVertex fromVertex = Mockito.mock(GraphVertex.class);
-               JanusGraphOperationStatus result;
-
-               JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);;
-               Mockito.when(fromVertex.getVertex()).thenReturn(value);
-               Iterator<Edge> value2 = Mockito.mock(Iterator.class);;
-               Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(value2);
-               Mockito.when(value2.hasNext()).thenReturn(true, false);
-               Edge value3 = Mockito.mock(Edge.class);;
-               Mockito.when(value2.next()).thenReturn(value3);
-               // default test
-               result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION);
-       }
-       
-       @Test
-       public void testUpdateVertex() throws Exception {
-
-               GraphVertex graphVertex = new GraphVertex();
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-
-               result = testSubject.updateVertex(graphVertex);
-       }
-
-       @Test
-       public void testGetVerticesByUniqueIdAndParseFlag() throws Exception {
-
-               Map<String, ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum>> verticesToGet = new HashMap<>();
-               Either<Map<String, GraphVertex>, JanusGraphOperationStatus> result;
-               
-               // default test
-               result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet);
-               ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum> value3 = ImmutablePair.of(GraphPropertyEnum.COMPONENT_TYPE, JsonParseFlagEnum.NoParse);
-               verticesToGet.put("mock", value3);
-               try {
-                       result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet);
-               } catch (Exception e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-       }
-
-       @Test
-       public void testCreateEdge_2() throws Exception {
-
-               Vertex from = null;
-               Vertex to = null;
-               EdgeLabelEnum label = null;
-               Edge edgeToCopy = null;
-               JanusGraphOperationStatus result;
-
-               // default test
-
-               result = testSubject.createEdge(from, to, label, edgeToCopy);
-       }
-
-
-       @Test
-       public void testReplaceEdgeLabel() throws Exception {
-
-               Vertex fromVertex = null;
-               Vertex toVertex = null;
-               Edge prevEdge = null;
-               EdgeLabelEnum prevLabel = null;
-               EdgeLabelEnum newLabel = null;
-               JanusGraphOperationStatus result;
-
-               // default test
-
-               result = testSubject.replaceEdgeLabel(fromVertex, toVertex, prevEdge, prevLabel, newLabel);
-       }
-
-       @Test
-       public void testUpdateVertexMetadataPropertiesWithJson() throws Exception {
-
-               Vertex vertex = Mockito.mock(Vertex.class);;
-               Map<GraphPropertyEnum, Object> properties = new HashMap<>();
-               properties.put(GraphPropertyEnum.COMPONENT_TYPE, "mock");
-               JanusGraphOperationStatus result;
-
-               // default test
-
-               result = testSubject.updateVertexMetadataPropertiesWithJson(vertex, properties);
-       }
-
-       //TODO Last
-       @Test
-       public void testDisassociateAndDeleteLast() throws Exception {
-
-               GraphVertex vertex = Mockito.mock(GraphVertex.class);
-               JanusGraphOperationStatus result;
-               
-               JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
-               Iterator<Edge> mockiter = Mockito.mock(Iterator.class);
-               Edge nextmock = Mockito.mock(Edge.class);
-               Mockito.when(vertex.getVertex()).thenReturn(value);
-               Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter);
-               Mockito.when(mockiter.hasNext()).thenReturn(true, false);
-               Mockito.when(mockiter.next()).thenReturn(nextmock);
-               Vertex secondVertex = Mockito.mock(Vertex.class);
-               Mockito.when(nextmock.outVertex()).thenReturn(secondVertex);
-               Mockito.when(nextmock.inVertex()).thenReturn(secondVertex);
-               Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class);
-               Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges);
-               Mockito.when(restOfEdges.hasNext()).thenReturn(false);
-               
-               // default test
-               result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION);
-       }
-       
-       @Test
-       public void testDisassociateAndDeleteLastOut() throws Exception {
-
-               GraphVertex vertex = Mockito.mock(GraphVertex.class);
-               JanusGraphOperationStatus result;
-               
-               JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);
-               Iterator<Edge> mockiter = Mockito.mock(Iterator.class);
-               Edge nextmock = Mockito.mock(Edge.class);
-               Mockito.when(vertex.getVertex()).thenReturn(value);
-               Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter);
-               Mockito.when(mockiter.hasNext()).thenReturn(true, false);
-               Mockito.when(mockiter.next()).thenReturn(nextmock);
-               Vertex secondVertex = Mockito.mock(Vertex.class);
-               Mockito.when(nextmock.outVertex()).thenReturn(secondVertex);
-               Mockito.when(nextmock.inVertex()).thenReturn(secondVertex);
-               Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class);
-               Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges);
-               Mockito.when(restOfEdges.hasNext()).thenReturn(false);
-               
-               // default test
-               result = testSubject.disassociateAndDeleteLast(vertex, Direction.IN, EdgeLabelEnum.ADDITIONAL_INFORMATION);
-       }
-       
-       @Test
-       public void testDisassociateAndDeleteLastException() throws Exception {
-
-               GraphVertex vertex = Mockito.mock(GraphVertex.class);
-               JanusGraphOperationStatus result;
-               
-               Mockito.when(vertex.getVertex()).thenThrow(RuntimeException.class);
-               
-               // default test
-               result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION);
-       }
-
-       @Test
-       public void testMoveEdge() throws Exception {
-
-               GraphVertex vertexA = new GraphVertex();
-               GraphVertex vertexB = new GraphVertex();
-               JanusGraphOperationStatus result;
-
-               // default test
-
-               result = testSubject.moveEdge(vertexA, vertexB, EdgeLabelEnum.ADDITIONAL_INFORMATION, Direction.BOTH);
-       }
-}
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoTest.java
deleted file mode 100644 (file)
index 2a3a4e8..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.be.dao.jsongraph;
-
-import org.janusgraph.core.JanusGraph;
-import fj.data.Either;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.sdc.be.dao.DAOJanusGraphStrategy;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
-import org.openecomp.sdc.be.utils.DAOConfDependentTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class JanusGraphDaoTest extends DAOConfDependentTest{
-       
-       
-       private static Logger logger = LoggerFactory.getLogger(JanusGraphDaoTest.class);
-       private JanusGraphDao dao = new JanusGraphDao(new JanusGraphClient(new DAOJanusGraphStrategy()));
-       
-       @Before
-       public void init(){
-       dao.janusGraphClient.createGraph();
-       }
-       
-       @After
-       public void end(){
-               dao.janusGraphClient.cleanupGraph();
-       }
-
-       @Test
-       public void testCreateVertex() throws Exception {
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-               GraphVertex graphVertex = new GraphVertex(VertexTypeEnum.REQUIREMENTS);
-               result = dao.createVertex(graphVertex);
-               
-               graphVertex = new GraphVertex();
-               result = dao.createVertex(graphVertex);
-       }
-       
-       @Test
-       public void testGetVertexByLabel() throws Exception {
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-               result = dao.getVertexByLabel(VertexTypeEnum.ADDITIONAL_INFORMATION);
-       }
-       
-       @Test
-       public void testCommit() throws Exception {
-               JanusGraphOperationStatus result;
-
-               // default test
-               
-               result = dao.commit();
-       }
-
-       
-       @Test
-       public void testRollback() throws Exception {
-               
-               JanusGraphOperationStatus result;
-
-               // default test
-               
-               result = dao.rollback();
-       }
-
-       @Test
-       public void testGetGraph() throws Exception {
-               
-               Either<JanusGraph, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getGraph();
-       }
-
-       @Test
-       public void testGetVertexByPropertyAndLabel() throws Exception {
-               
-               GraphPropertyEnum name = null;
-               Object value = null;
-               VertexTypeEnum label = null;
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getVertexByPropertyAndLabel(name, value, label);
-               
-               result = dao.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, new Object(), VertexTypeEnum.ADDITIONAL_INFORMATION);
-       }
-
-       @Test
-       public void testGetVertexByPropertyAndLabel_1() throws Exception {
-               
-               GraphPropertyEnum name = null;
-               Object value = null;
-               VertexTypeEnum label = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getVertexByPropertyAndLabel(name, value, label, parseFlag);
-       }
-
-       
-       @Test
-       public void testGetVertexById() throws Exception {
-               
-               String id = "";
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getVertexById(id);
-       }
-
-       @Test
-       public void testGetVertexById_1() throws Exception {
-               
-               String id = "";
-               JsonParseFlagEnum parseFlag = null;
-               Either<GraphVertex, JanusGraphOperationStatus> result;
-
-               // test 1
-               
-               id = null;
-               result = dao.getVertexById(id, parseFlag);
-
-               // test 2
-               
-               id = "";
-               result = dao.getVertexById(id, parseFlag);
-       }
-
-       @Test
-       public void testGetVertexProperties() throws Exception {
-               
-               Element element = null;
-               Map<GraphPropertyEnum, Object> result;
-
-               // test 1
-               
-               element = null;
-               result = dao.getVertexProperties(element);
-       }
-
-       
-       @Test
-       public void testGetEdgeProperties() throws Exception {
-               
-               Element element = null;
-               Map<EdgePropertyEnum, Object> result;
-
-               // test 1
-               
-               element = null;
-               result = dao.getEdgeProperties(element);
-       }
-
-       @Test
-       public void testGetByCriteria() throws Exception {
-               
-               VertexTypeEnum type = null;
-               Map<GraphPropertyEnum, Object> props = null;
-               Either<List<GraphVertex>, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getByCriteria(type, props);
-       }
-
-       @Test
-       public void testGetByCriteria_1() throws Exception {
-               
-               VertexTypeEnum type = null;
-               Map<GraphPropertyEnum, Object> props = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<List<GraphVertex>, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getByCriteria(type, props, parseFlag);
-       }
-
-       
-       @Test
-       public void testGetByCriteria_2() throws Exception {
-               
-               VertexTypeEnum type = null;
-               Map<GraphPropertyEnum, Object> props = null;
-               Map<GraphPropertyEnum, Object> hasNotProps = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<List<GraphVertex>, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getByCriteria(type, props, hasNotProps, parseFlag);
-       }
-
-       @Test
-       public void testGetCatalogVerticies() throws Exception {
-               
-               Either<Iterator<Vertex>, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getCatalogOrArchiveVerticies(true);
-       }
-       
-       @Test
-       public void testGetParentVertecies_1() throws Exception {
-               
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<List<Vertex>, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getParentVertices(parentVertex, edgeLabel, parseFlag);
-       }
-
-       @Test
-       public void testGetChildrenVertecies_1() throws Exception {
-               
-               Vertex parentVertex = null;
-               EdgeLabelEnum edgeLabel = null;
-               JsonParseFlagEnum parseFlag = null;
-               Either<List<Vertex>, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getChildrenVertices(parentVertex, edgeLabel, parseFlag);
-       }
-
-       @Test
-       public void testUpdateVertexMetadataPropertiesWithJson() throws Exception {
-               
-               Vertex vertex = null;
-               Map<GraphPropertyEnum, Object> properties = null;
-               JanusGraphOperationStatus result;
-
-               // default test
-               
-               result = dao.updateVertexMetadataPropertiesWithJson(vertex, properties);
-       }
-
-       @Test
-       public void testGetProperty() throws Exception {
-               Edge edge = Mockito.mock(Edge.class);;
-               Object result;
-               
-               Property<Object> value = Mockito.mock(Property.class);
-               Mockito.when(edge.property(Mockito.any())).thenReturn(value);
-               
-               // default test
-               result = dao.getProperty(edge, EdgePropertyEnum.STATE);
-       }
-       
-       @Test
-       public void testGetProperty_1() throws Exception {
-               Edge edge = Mockito.mock(Edge.class);;
-               Object result;
-
-               // default test
-               result = dao.getProperty(edge, EdgePropertyEnum.STATE);
-       }
-
-       @Test
-       public void testGetPropertyexception() throws Exception {
-               Edge edge = Mockito.mock(Edge.class);;
-               Object result;
-               
-               Property<Object> value = Mockito.mock(Property.class);
-               Mockito.when(edge.property(Mockito.any())).thenThrow(RuntimeException.class);
-               
-               // default test
-               result = dao.getProperty(edge, EdgePropertyEnum.STATE);
-       }
-       
-       @Test
-       public void testGetBelongingEdgeByCriteria_1() throws Exception {
-               
-               String parentId = "";
-               EdgeLabelEnum label = null;
-               Map<GraphPropertyEnum, Object> properties = null;
-               Either<Edge, JanusGraphOperationStatus> result;
-
-               // default test
-               
-               result = dao.getBelongingEdgeByCriteria(parentId, label, properties);
-       }
-}
index b0cc95f..874b3a6 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.utils;
 
-import org.junit.BeforeClass;
+import org.junit.jupiter.api.BeforeAll;
 import org.openecomp.sdc.common.test.BaseConfDependent;
 
 public class DAOConfDependentTest extends BaseConfDependent {
-       @BeforeClass
-    public static void setupBeforeClass() {
+
+    @BeforeAll
+    static void setupBeforeClass() {
         componentName = "catalog-dao";
         confPath = "src/test/resources/config";
         setUp();
index c580062..b8ef2ae 100644 (file)
@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index f2e4238..92dc67b 100644 (file)
@@ -41,7 +41,7 @@ import org.janusgraph.core.JanusGraphVertex;
 import org.openecomp.sdc.be.dao.impl.HealingPipelineDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 4b6c084..00b4d8e 100644 (file)
@@ -25,7 +25,7 @@ import java.util.List;
 import java.util.Map;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
index dd21ccf..64f5934 100644 (file)
@@ -30,7 +30,7 @@ import java.util.Map;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.elements.MapComponentInstanceExternalRefs;
index f40b19a..42edcee 100644 (file)
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.utils.MapUtil;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
index 2f11fa9..bd61f61 100644 (file)
@@ -57,7 +57,7 @@ import org.openecomp.sdc.be.config.Configuration;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 42f1b03..4c97b45 100644 (file)
@@ -43,7 +43,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index b9378b8..caf1c4e 100644 (file)
@@ -36,7 +36,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
 import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
index d4bd799..900c340 100644 (file)
@@ -38,7 +38,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
 import org.openecomp.sdc.be.data.model.ToscaImportByModel;
index c30c398..228bff9 100644 (file)
@@ -24,7 +24,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.model.PropertyDefinition;
 import org.openecomp.sdc.be.model.operations.StorageException;
index 82d1c2a..1bc067e 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition;
index 5fc2ef2..556e362 100644 (file)
@@ -24,7 +24,7 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.datatypes.elements.MapPropertiesDataDefinition;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
index 0a2055c..2febef6 100644 (file)
@@ -29,7 +29,7 @@ import org.mockito.Mockito;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.datatypes.elements.MapComponentInstanceExternalRefs;
index 35d943d..bad3615 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.model.Component;
 import org.openecomp.sdc.be.model.ComponentParametersView;
index e7512a9..4925c87 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.elements.MapDataDefinition;
index 9c91948..576aa8a 100644 (file)
@@ -50,7 +50,7 @@ import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 5a02c57..72b047a 100644 (file)
@@ -66,7 +66,7 @@ import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index f9cecd5..37e360c 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.elements.PolicyDataDefinition;
index 865aa93..1171a88 100644 (file)
@@ -31,7 +31,7 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.model.Component;
index 18684a0..bfa3dd6 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.datatypes.elements.MapCapabilityProperty;
index dc5e2fd..82560b0 100644 (file)
@@ -32,7 +32,7 @@ import org.mockito.Mockito;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 15653c0..29fbd75 100644 (file)
@@ -32,7 +32,7 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
index 12f4628..3da37c0 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
 import org.junit.rules.TestName;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
index 5fd04b6..d60a574 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType;
 import org.openecomp.sdc.be.model.Component;
 import org.openecomp.sdc.be.model.ComponentParametersView;
index b88eec2..753953f 100644 (file)
@@ -72,7 +72,7 @@ import org.mockito.MockitoAnnotations;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index 98cec19..1494f20 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
index 06e0b42..c5c01bb 100644 (file)
@@ -25,7 +25,7 @@ import org.janusgraph.core.JanusGraphVertex;
 import fj.data.Either;
 import org.apache.tinkerpop.gremlin.structure.io.IoCore;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
index d8b7e53..58ee0d5 100644 (file)
@@ -32,7 +32,7 @@ import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
@@ -55,7 +55,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.EnumMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
index e8d01db..44a9a7d 100644 (file)
@@ -53,7 +53,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
 import org.openecomp.sdc.be.data.model.ToscaImportByModel;
index 78b4a0e..642e838 100644 (file)
@@ -32,7 +32,7 @@ import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.model.PropertyDefinition;
 import org.openecomp.sdc.be.model.operations.StorageException;
index 654b074..a80e44e 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.rules.TestName;
 import org.junit.runner.RunWith;
 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
 import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
index e92820f..0cc1361 100644 (file)
       <version>${hamcrest.version}</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.jmockit</groupId>
-      <artifactId>jmockit</artifactId>
-      <version>${jmockit.version}</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>