summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java66
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java188
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java85
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java87
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java357
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java769
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java387
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java150
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java60
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java36
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java37
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java37
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java37
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java62
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java171
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java340
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java72
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java309
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java144
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java84
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java24
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java85
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java63
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java244
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java44
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java167
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java46
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java93
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java119
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java29
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java54
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java242
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java266
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java39
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java107
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java164
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java38
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java71
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java36
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java56
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java91
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java47
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java54
44 files changed, 5530 insertions, 129 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java
new file mode 100644
index 0000000000..be55cbd12a
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java
@@ -0,0 +1,66 @@
+package org.openecomp.sdc.be.components.clean;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class AsdcComponentsCleanerTaskTest {
+
+ private AsdcComponentsCleanerTask createTestSubject() {
+ return new AsdcComponentsCleanerTask();
+ }
+
+
+ @Test
+ public void testInit() throws Exception {
+ AsdcComponentsCleanerTask testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.init();
+ }
+
+
+ @Test
+ public void testDestroy() throws Exception {
+ AsdcComponentsCleanerTask testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.destroy();
+ }
+
+
+ @Test
+ public void testStartTask() throws Exception {
+ AsdcComponentsCleanerTask testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.startTask();
+ }
+
+
+ @Test
+ public void testStopTask() throws Exception {
+ AsdcComponentsCleanerTask testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.stopTask();
+ }
+
+
+
+
+
+ @Test
+ public void testRun() throws Exception {
+ AsdcComponentsCleanerTask testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.run();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java
new file mode 100644
index 0000000000..f2053535ad
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java
@@ -0,0 +1,188 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
+import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
+import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
+import org.openecomp.sdc.be.model.operations.api.IElementOperation;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class AdditionalInformationBusinessLogicTest {
+
+ private AdditionalInformationBusinessLogic createTestSubject() {
+ return new AdditionalInformationBusinessLogic();
+ }
+
+
+ @Test
+ public void testGetElementDao() throws Exception {
+ Class<IElementOperation> class1 = null;
+ ServletContext context = null;
+ IElementOperation result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testCreateAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateAndConvertValue() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String context = "";
+ ResponseFormat result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateAndConvertKey() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String context = "";
+ ResponseFormat result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateMaxSizeNotReached() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String componentId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ ResponseFormat result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateValue() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ String value = "";
+ Either<String, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testFindAdditionInformationKey() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;List<AdditionalInfoParameterInfo> parameters = null;
+ String key = "";
+ AdditionalInfoParameterInfo result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testValidateAndNormalizeKey() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ String key = "";
+ Either<String, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInformationDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testVerifyCanWorkOnComponent() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ String userId = "";
+ ResponseFormat result;
+
+ // default test
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java
new file mode 100644
index 0000000000..e10c3b41ba
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java
@@ -0,0 +1,85 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class AttributeBusinessLogicTest {
+
+ private AttributeBusinessLogic createTestSubject() {
+ return new AttributeBusinessLogic();
+ }
+
+
+ @Test
+ public void testCreateAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ PropertyDefinition newAttributeDef = null;
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testIsAttributeExist() throws Exception {
+ AttributeBusinessLogic testSubject;List<PropertyDefinition> attributes = null;
+ String resourceUid = "";
+ String propertyName = "";
+ boolean result;
+
+ // test 1
+ testSubject=createTestSubject();attributes = null;
+ }
+
+
+ @Test
+ public void testGetAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ PropertyDefinition newAttDef = null;
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java
new file mode 100644
index 0000000000..259d47befa
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java
@@ -0,0 +1,87 @@
+package org.openecomp.sdc.be.components.impl;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.ConsumerDefinition;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class ConsumerBusinessLogicTest {
+
+ private ConsumerBusinessLogic createTestSubject() {
+ return new ConsumerBusinessLogic();
+ }
+
+
+ @Test
+ public void testCreateConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ User user = null;
+ ConsumerDefinition consumer = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+
+ @Test
+ public void testGetConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ String consumerId = "";
+ User user = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ user = null;
+ }
+
+
+ @Test
+ public void testGetConsumer_1() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ String consumerId = "";
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ String consumerId = "";
+ User user = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ ConsumerDefinition consumer = null;
+ User modifier = null;
+ boolean isCreateRequest = false;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java
new file mode 100644
index 0000000000..7722c1fdea
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java
@@ -0,0 +1,357 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import javax.annotation.Generated;
+
+import org.apache.commons.httpclient.NameValuePair;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.api.ActionStatus;
+import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
+import org.openecomp.sdc.be.datamodel.api.CategoryTypeEnum;
+import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum;
+import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
+import org.openecomp.sdc.be.model.ArtifactType;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.DistributionStatusEnum;
+import org.openecomp.sdc.be.model.LifecycleStateEnum;
+import org.openecomp.sdc.be.model.PropertyScope;
+import org.openecomp.sdc.be.model.Resource;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.category.CategoryDefinition;
+import org.openecomp.sdc.be.model.category.GroupingDefinition;
+import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
+import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.be.resources.data.ComponentMetadataData;
+import org.openecomp.sdc.be.resources.data.ResourceMetadataData;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.be.resources.data.category.SubCategoryData;
+import org.openecomp.sdc.be.ui.model.UiCategories;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.util.concurrent.Service;
+import com.thinkaurelius.titan.core.TitanGraph;
+
+import fj.data.Either;
+import io.swagger.annotations.Tag;
+
+
+public class ElementBusinessLogicTest {
+
+ private ElementBusinessLogic createTestSubject() {
+ return new ElementBusinessLogic();
+ }
+
+
+ @Test
+ public void testGetFollowed() throws Exception {
+ ElementBusinessLogic testSubject;
+ User user = null;
+ Either<Map<String, List<? extends Component>>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+ @Test
+ public void testGetAllResourceCategories() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<List<CategoryDefinition>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllServiceCategories() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<List<CategoryDefinition>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testCreateCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ CategoryDefinition category = null;
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<CategoryDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ category = null;
+ }
+
+
+ @Test
+ public void testCreateSubCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ SubCategoryDefinition subCategory = null;
+ String componentTypeParamName = "";
+ String parentCategoryId = "";
+ String userId = "";
+ Either<SubCategoryDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ subCategory = null;
+ }
+
+
+ @Test
+ public void testCreateGrouping() throws Exception {
+ ElementBusinessLogic testSubject;
+ GroupingDefinition grouping = null;
+ String componentTypeParamName = "";
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String userId = "";
+ Either<GroupingDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ grouping = null;
+ }
+
+
+ @Test
+ public void testGetAllCategories() throws Exception {
+ ElementBusinessLogic testSubject;
+ String componentType = "";
+ String userId = "";
+ Either<List<CategoryDefinition>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ userId = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ userId = "";
+ }
+
+
+ @Test
+ public void testGetAllCategories_1() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ Either<UiCategories, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ String categoryId = "";
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<CategoryDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteSubCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<SubCategoryDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteGrouping() throws Exception {
+ ElementBusinessLogic testSubject;
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String groupingId = "";
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<GroupingDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+ @Test
+ public void testGetAllPropertyScopes() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ Either<List<PropertyScope>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllArtifactTypes() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ Either<List<ArtifactType>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllDeploymentArtifactTypes() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<Map<String, Object>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetDefaultHeatTimeout() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<Integer, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetCatalogComponents() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ List<OriginTypeEnum> excludeTypes = null;
+ Either<Map<String, List<? extends Component>>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetFilteredCatalogComponents() throws Exception {
+ ElementBusinessLogic testSubject;
+ String assetType = "";
+ Map<FilterKeyEnum, String> filters = null;
+ String query = "";
+ Either<List<? extends Component>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ query = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ query = "";
+
+ // test 3
+ testSubject = createTestSubject();
+ filters = null;
+ }
+
+
+
+
+ @Test
+ public void testGetCatalogComponentsByUuidAndAssetType() throws Exception {
+ ElementBusinessLogic testSubject;
+ String assetType = "";
+ String uuid = "";
+ Either<List<? extends Component>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ assetType = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ assetType = "";
+
+ // test 3
+ testSubject = createTestSubject();
+ assetType = null;
+
+ // test 4
+ testSubject = createTestSubject();
+ assetType = "";
+ }
+
+
+ @Test
+ public void testGetAllComponentTypesParamNames() throws Exception {
+ ElementBusinessLogic testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAllComponentTypesParamNames();
+ }
+
+
+ @Test
+ public void testGetAllSupportedRoles() throws Exception {
+ ElementBusinessLogic testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAllSupportedRoles();
+ }
+
+
+ @Test
+ public void testGetResourceTypesMap() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<Map<String, String>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+
+ @Test
+ public void testGetFilteredResouces() throws Exception {
+ ElementBusinessLogic testSubject;
+ Map<FilterKeyEnum, String> filters = null;
+ boolean inTransaction = false;
+ Either<List<Component>, StorageOperationStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java
new file mode 100644
index 0000000000..df2d2e7fdc
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java
@@ -0,0 +1,769 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.info.ArtifactTemplateInfo;
+import org.openecomp.sdc.be.info.GroupDefinitionInfo;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.ComponentInstance;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+import org.openecomp.sdc.be.model.GroupDefinition;
+import org.openecomp.sdc.be.model.GroupInstance;
+import org.openecomp.sdc.be.model.GroupInstanceProperty;
+import org.openecomp.sdc.be.model.GroupProperty;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition.PropertyNames;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.base.Function;
+
+import fj.data.Either;
+
+
+public class GroupBusinessLogicTest {
+
+ private GroupBusinessLogic createTestSubject() {
+ return new GroupBusinessLogic();
+ }
+
+
+ @Test
+ public void testGetComponentTypeForResponse() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testVerifyArtifactsBelongsToComponent() throws Exception {
+ GroupBusinessLogic testSubject;Component component = null;
+ List<String> artifacts = null;
+ String context = "";
+ Either<Boolean,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();artifacts = null;
+
+
+ }
+
+
+ @Test
+ public void testVerifyComponentInstancesAreValidMembers() throws Exception {
+ GroupBusinessLogic testSubject;Component component = null;
+ ComponentTypeEnum componentType = null;
+ String groupName = "";
+ String groupType = "";
+ Map<String,String> groupMembers = null;
+ List<String> memberToscaTypes = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();groupMembers = null;
+
+
+
+ // test 2
+ testSubject=createTestSubject();memberToscaTypes = null;
+
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupMetadata() throws Exception {
+ GroupBusinessLogic testSubject;
+ String componentId = "";
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ GroupDefinition updatedGroup = null;
+ boolean inTransaction = false;
+ boolean shouldLock = false;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroupMetadata() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ GroupDefinition currentGroup = null;
+ GroupDefinition updatedGroup = null;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroup() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ GroupDefinition updatedGroup = null;
+ String currentGroupName = "";
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupProperties() throws Exception {
+ GroupBusinessLogic testSubject;
+ String componentId = "";
+ String groupUniqueId = "";
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupProperty> groupPropertiesToUpdate = null;
+ boolean inTransaction = false;
+ Either<List<GroupProperty>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testResetEmptyValueWithDefaults() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupProperty> groupPropertiesToUpdate = null;
+ GroupDefinition originalGroup = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testValidateGroupPropertyAndResetEmptyValue() throws Exception {
+ GroupBusinessLogic testSubject;GroupDefinition originalGroup = null;
+ List<GroupProperty> groupPropertiesToUpdate = null;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidatePropertyBusinessLogic() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupProperty> groupPropertiesToUpdate = null;
+ GroupDefinition originalGroup = null;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testPrepareMapWithOriginalProperties() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupDefinition originalGroup = null;
+ Map<PropertyNames, String> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateOnlyValueChanged() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupProperty> groupPropertiesToUpdate = null;
+ GroupDefinition originalGroup = null;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testIsOnlyGroupPropertyValueChanged() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupProperty groupProperty = null;
+ GroupProperty groupProperty2 = null;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupMetadata_1() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupDefinition currentGroup = null;
+ GroupDefinition groupUpdate = null;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupName() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupDefinition currentGroup = null;
+ GroupDefinition groupUpdate = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGroupName() throws Exception {
+ GroupBusinessLogic testSubject;
+ String currentGroupName = "";
+ String groupUpdateName = "";
+ boolean isforceNameModification = false;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetGroupWithArtifactsById() throws Exception {
+ GroupBusinessLogic testSubject;
+ ComponentTypeEnum componentType = null;
+ String componentId = "";
+ String groupId = "";
+ String userId = "";
+ boolean inTransaction = false;
+ Either<GroupDefinitionInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testFindGroupOnComponent() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ String groupId = "";
+ Either<GroupDefinition, StorageOperationStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGroupsBeforeUpdate() throws Exception {
+ GroupBusinessLogic testSubject;String componentId = "";
+ String userId = "";
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groups = null;
+ boolean inTransaction = false;
+ Either<org.openecomp.sdc.be.model.Component,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateGroupsInComponentByFunc() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupDefinition> groups = null;
+ Component component = null;
+ Function<GroupDefinition,String> getByParam = null;
+ ResponseFormat result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAsString() throws Exception {
+ GroupBusinessLogic testSubject;
+ List<String> list = null;
+ String result;
+
+ // test 1
+ testSubject = createTestSubject();
+ list = null;
+
+
+ }
+
+
+ @Test
+ public void testUpdateGroupPropertiesValue() throws Exception {
+ GroupBusinessLogic testSubject;String componentId = "";
+ GroupDefinition currentGroup = null;
+ List<GroupProperty> groupPropertyToUpdate = null;
+ boolean inTransaction = false;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateGenerateVfModuleGroupNames() throws Exception {
+ GroupBusinessLogic testSubject;
+ List<ArtifactTemplateInfo> allGroups = null;
+ String resourceSystemName = "";
+ int startGroupCounter = 0;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGenerateVfModuleGroupName() throws Exception {
+ GroupBusinessLogic testSubject;
+ String resourceSystemName = "";
+ String description = "";
+ int groupCounter = 0;
+ Either<String, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ resourceSystemName = null;
+ description = null;
+
+
+
+ // test 2
+ testSubject = createTestSubject();
+ resourceSystemName = "";
+ description = null;
+
+
+
+ // test 3
+ testSubject = createTestSubject();
+ description = null;
+ resourceSystemName = null;
+
+
+
+ // test 4
+ testSubject = createTestSubject();
+ description = "";
+ resourceSystemName = null;
+
+
+ }
+
+
+ @Test
+ public void testValidateUpdateVfGroupNames() throws Exception {
+ GroupBusinessLogic testSubject;
+ Map<String, GroupDefinition> groups = null;
+ String resourceSystemName = "";
+ Either<Map<String, GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetNextVfModuleNameCounter() throws Exception {
+ GroupBusinessLogic testSubject;
+ Map<String, GroupDefinition> groups = null;
+ int result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groups = null;
+
+
+ }
+
+
+ @Test
+ public void testGetNextVfModuleNameCounter_1() throws Exception {
+ GroupBusinessLogic testSubject;
+ Collection<GroupDefinition> groups = null;
+ int result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groups = null;
+
+
+ }
+
+
+ @Test
+ public void testValidateUpdateVfGroupNamesOnGraph() throws Exception {
+ GroupBusinessLogic testSubject;
+ List<GroupDefinition> groups = null;
+ Component component = null;
+ boolean inTransaction = false;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetGroupInstWithArtifactsById() throws Exception {
+ GroupBusinessLogic testSubject;
+ ComponentTypeEnum componentType = null;
+ String componentId = "";
+ String componentInstanceId = "";
+ String groupInstId = "";
+ String userId = "";
+ boolean inTransaction = false;
+ Either<GroupDefinitionInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testFindComponentInstanceAndGroupInstanceOnComponent() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ String componentInstanceId = "";
+ String groupInstId = "";
+ Either<ImmutablePair<ComponentInstance, GroupInstance>, StorageOperationStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetLatestIntProperty() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ PropertyNames propertyKey = null;
+ int result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testIsPropertyChanged() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ PropertyNames minInstances = null;
+ boolean result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateMinMaxAndInitialCountPropertyLogicVF() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateMinMaxAndInitialCountPropertyLogic() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> currValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateValueInRange() throws Exception {
+ GroupBusinessLogic testSubject;ImmutablePair<PropertyNames,String> newValue = null;
+ ImmutablePair<PropertyNames,String> min = null;
+ ImmutablePair<PropertyNames,String> max = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testParseIntValue() throws Exception {
+ GroupBusinessLogic testSubject;
+ String value = "";
+ PropertyNames propertyName = null;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupInstancePropertyValues() throws Exception {
+ GroupBusinessLogic testSubject;
+ String componentId = "";
+ String instanceId = "";
+ GroupInstance oldGroupInstance = null;
+ List<GroupInstanceProperty> newProperties = null;
+ boolean inTransaction = false;
+ Either<GroupInstance, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateReduceGroupInstancePropertiesBeforeUpdate() throws Exception {
+ GroupBusinessLogic testSubject;GroupInstance oldGroupInstance = null;
+ List<GroupInstanceProperty> newProperties = null;
+ Either<List<GroupInstanceProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testFillValuesAndParentValuesFromExistingProperties() throws Exception {
+ GroupBusinessLogic testSubject;Map<String,GroupInstanceProperty> existingProperties = null;
+ Map<PropertyNames,String> propertyValues = null;
+ Map<PropertyNames,String> parentPropertyValues = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testHandleAndAddProperty() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupInstanceProperty> reducedProperties = null;
+ Map<PropertyNames,String> newPropertyValues = null;
+ GroupInstanceProperty currNewProperty = null;
+ GroupInstanceProperty currExistingProperty = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testIsUpdatable() throws Exception {
+ GroupBusinessLogic testSubject;
+ PropertyNames updatablePropertyName = null;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testAddPropertyUpdatedValues() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupInstanceProperty> reducedProperties = null;
+ PropertyNames propertyName = null;
+ Map<PropertyNames,String> newPropertyValues = null;
+ GroupInstanceProperty newProperty = null;
+ GroupInstanceProperty existingProperty = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testIsEmptyMinInitialCountValue() throws Exception {
+ GroupBusinessLogic testSubject;
+ PropertyNames propertyName = null;
+ String newValue = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testConvertIfUnboundMax() throws Exception {
+ GroupBusinessLogic testSubject;
+ String value = "";
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdatePropertyValue() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupInstanceProperty newProperty = null;
+ GroupInstanceProperty existingProperty = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateImmutableProperty() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupProperty oldProperty = null;
+ GroupProperty newProperty = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testCreateGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groupDefinitions = null;
+
+
+ }
+
+
+ @Test
+ public void testAddGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groupDefinitions = null;
+
+
+ }
+
+
+ @Test
+ public void testDeleteGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testHandleGroup() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ GroupDefinition groupDefinition = null;
+ Map<String, DataTypeDefinition> allDAtaTypes = null;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testHandleProperty() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupProperty groupProperty = null;
+ PropertyDefinition prop = null;
+ Integer index = 0;
+ Map<String, DataTypeDefinition> allDataTypes = null;
+ Either<GroupProperty, TitanOperationStatus> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ prop = null;
+
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java
new file mode 100644
index 0000000000..222bba53d2
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java
@@ -0,0 +1,387 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.apache.commons.math3.stat.descriptive.summary.Product;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.ComponentInstance;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.operations.api.ICacheMangerOperation;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class ProductBusinessLogicTest {
+
+ private ProductBusinessLogic createTestSubject() {
+ return new ProductBusinessLogic();
+ }
+
+ @Test
+ public void testValidateProductNameExists() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productName = "";
+ String userId = "";
+ Either<Map<String, Boolean>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+ @Test
+ public void testSetDeploymentArtifactsPlaceHolder() throws Exception {
+ ProductBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDeploymentArtifactsPlaceHolder(component, user);
+ }
+
+ @Test
+ public void testDeleteMarkedComponents() throws Exception {
+ ProductBusinessLogic testSubject;
+ Either<List<String>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testGetComponentInstanceBL() throws Exception {
+ ProductBusinessLogic testSubject;
+ ComponentInstanceBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testGetComponentInstancesFilteredByPropertiesAndInputs() throws Exception {
+ ProductBusinessLogic testSubject;
+ String componentId = "";
+ ComponentTypeEnum componentTypeEnum = null;
+ String userId = "";
+ String searchText = "";
+ Either<List<ComponentInstance>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testGetCacheManagerOperation() throws Exception {
+ ProductBusinessLogic testSubject;
+ ICacheMangerOperation result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testSetCacheManagerOperation() throws Exception {
+ ProductBusinessLogic testSubject;
+ ICacheMangerOperation cacheManagerOperation = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCacheManagerOperation(cacheManagerOperation);
+ }
+
+ @Test
+ public void testGetUiComponentDataTransferByComponentId() throws Exception {
+ ProductBusinessLogic testSubject;
+ String componentId = "";
+ List<String> dataParamsToReturn = null;
+ Either<UiComponentDataTransfer, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateProduct() throws Exception {
+ ProductBusinessLogic testSubject;
+ Product product = null;
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ product = null;
+
+ }
+
+
+ @Test
+ public void testCheckUnupdatableProductFields() throws Exception {
+ ProductBusinessLogic testSubject;
+ Product product = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateProductBeforeCreate() throws Exception {
+ ProductBusinessLogic testSubject;
+ Product product = null;
+ User user = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateProductFieldsBeforeCreate() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateProductContactsList() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGrouping() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetProduct() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productId = "";
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteProduct() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productId = "";
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateProductFullNameAndCleanup() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateProductNameAndCleanup() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateTagsListAndRemoveDuplicates() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ String oldProductName = "";
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateProductMetadata() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productId = "";
+ Product updatedProduct = null;
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ updatedProduct = null;
+ }
+
+
+ @Test
+ public void testValidateAndUpdateProductMetadata() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateProductName() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateFullName() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateCategory() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateContactList() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateTags() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateTagPattern() throws Exception {
+ ProductBusinessLogic testSubject;
+ String tag = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetProductByNameAndVersion() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productName = "";
+ String productVersion = "";
+ String userId = "";
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
index 796a426e26..0e27636901 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
@@ -51,6 +51,7 @@ import org.openecomp.sdc.be.auditing.api.IAuditingManager;
import org.openecomp.sdc.be.auditing.impl.AuditingLogFormatUtil;
import org.openecomp.sdc.be.auditing.impl.AuditingManager;
import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum;
+import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationInfo;
import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction;
import org.openecomp.sdc.be.config.ConfigurationManager;
@@ -62,25 +63,32 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.WebAppContextWrapper;
+import org.openecomp.sdc.be.info.ArtifactTemplateInfo;
+import org.openecomp.sdc.be.info.MergedArtifactInfo;
import org.openecomp.sdc.be.model.ArtifactDefinition;
import org.openecomp.sdc.be.model.CapabilityDefinition;
import org.openecomp.sdc.be.model.Component;
import org.openecomp.sdc.be.model.ComponentInstance;
-import org.openecomp.sdc.be.model.ComponentMetadataDefinition;
+import org.openecomp.sdc.be.model.ComponentInstanceInput;
+import org.openecomp.sdc.be.model.ComponentInstanceProperty;
import org.openecomp.sdc.be.model.CsarInfo;
import org.openecomp.sdc.be.model.DataTypeDefinition;
import org.openecomp.sdc.be.model.GroupDefinition;
import org.openecomp.sdc.be.model.GroupProperty;
import org.openecomp.sdc.be.model.GroupTypeDefinition;
+import org.openecomp.sdc.be.model.HeatParameterDefinition;
import org.openecomp.sdc.be.model.InputDefinition;
import org.openecomp.sdc.be.model.LifeCycleTransitionEnum;
import org.openecomp.sdc.be.model.LifecycleStateEnum;
import org.openecomp.sdc.be.model.NodeTypeInfo;
import org.openecomp.sdc.be.model.ParsedToscaYamlInfo;
import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
+import org.openecomp.sdc.be.model.RequirementDefinition;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.UploadCapInfo;
import org.openecomp.sdc.be.model.UploadComponentInstanceInfo;
+import org.openecomp.sdc.be.model.UploadPropInfo;
import org.openecomp.sdc.be.model.UploadReqInfo;
import org.openecomp.sdc.be.model.UploadResourceInfo;
import org.openecomp.sdc.be.model.User;
@@ -121,6 +129,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.context.WebApplicationContext;
import com.att.nsa.cambria.test.support.CambriaBatchingPublisherMock.Entry;
+import com.google.common.base.Equivalence.Wrapper;
+import com.netflix.astyanax.connectionpool.Operation;
import fj.data.Either;
@@ -2225,5 +2235,143 @@ public class ResourceBusinessLogicTest {
testSubject.setCacheManagerOperation(cacheManagerOperation);
}
+
+ @Test
+ public void testGetElementDao_1() throws Exception {
+ ResourceBusinessLogic testSubject;IElementOperation result;
+
+ // default test
+ testSubject=createTestSubject();result=testSubject.getElementDao();
+ }
+
+
+ @Test
+ public void testGetAllCertifiedResources() throws Exception {
+ ResourceBusinessLogic testSubject;boolean getAbstract = false;
+ HighestFilterEnum highestFilter = null;
+ String userId = "";
+ Either<List<Resource>,ResponseFormat> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testValidateResourceNameExists() throws Exception {
+ ResourceBusinessLogic testSubject;String resourceName = "";
+ ResourceTypeEnum resourceTypeEnum = null;
+ String userId = "";
+ Either<Map<String,Boolean>,ResponseFormat> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testCreateResource() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ AuditingActionEnum auditingAction = null;
+ User user = null;
+ Map<String,byte[]> csarUIPayload = null;
+ String payloadName = "";
+ Either<Resource,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();payloadName = null;
+
+ // test 2
+ testSubject=createTestSubject();payloadName = "";
+ }
+
+
+ @Test
+ public void testValidateAndUpdateResourceFromCsar() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ User user = null;
+ Map<String,byte[]> csarUIPayload = null;
+ String payloadName = "";
+ String resourceUniqueId = "";
+ Either<Resource,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();payloadName = null;
+
+ // test 2
+ testSubject=createTestSubject();payloadName = "";
+ }
+
+
+
+
+
+
+
+
+
+
+
+ @Test
+ public void testCreateResourceFromCsar() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ User user = null;
+ Either<Map<String,byte[]>,StorageOperationStatus> csarUIPayload = null;
+ String csarUUID = "";
+ Either<Resource,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();csarUIPayload = null;
+ }
+
+
+
+
+
+
+
+ @Test
+ public void testCreateResourcesFromYamlNodeTypesList() throws Exception {
+ ResourceBusinessLogic testSubject;String yamlName = "";
+ Resource resource = null;
+ Map<String,Object> mappedToscaTemplate = null;
+ boolean needLock = false;
+ Map<String,EnumMap<ArtifactOperationEnum,List<ArtifactDefinition>>> nodeTypesArtifactsToHandle = null;
+ List<ArtifactDefinition> nodeTypesNewCreatedArtifacts = null;
+ Map<String,NodeTypeInfo> nodeTypesInfo = null;
+ CsarInfo csarInfo = null;
+ Either<Map<String,Resource>,ResponseFormat> result;
+
+ // default test
+ }
+
+
+
+
+
+
+ @Test
+ public void testValidateResourceCreationFromNodeType() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ User creator = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testCreateResourceFromNodeType() throws Exception {
+ ResourceBusinessLogic testSubject;String nodeTypeYaml = "";
+ UploadResourceInfo resourceMetaData = null;
+ User creator = null;
+ boolean isInTransaction = false;
+ boolean needLock = false;
+ Map<ArtifactOperationEnum,List<ArtifactDefinition>> nodeTypeArtifactsToHandle = null;
+ List<ArtifactDefinition> nodeTypesNewCreatedArtifacts = null;
+ boolean forceCertificationAllowed = false;
+ CsarInfo csarInfo = null;
+ Either<ImmutablePair<Resource,ActionStatus>,ResponseFormat> result;
+
+ // default test
+ }
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java
new file mode 100644
index 0000000000..4010d9bf86
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java
@@ -0,0 +1,60 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.ArtifactType;
+
+
+public class ArtifactTypesInfoTest {
+
+ private ArtifactTypesInfo createTestSubject() {
+ return new ArtifactTypesInfo();
+ }
+
+
+ @Test
+ public void testGetArtifactTypes() throws Exception {
+ ArtifactTypesInfo testSubject;
+ List<ArtifactType> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getArtifactTypes();
+ }
+
+
+ @Test
+ public void testSetArtifactTypes() throws Exception {
+ ArtifactTypesInfo testSubject;
+ List<ArtifactType> artifactTypes = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setArtifactTypes(artifactTypes);
+ }
+
+
+ @Test
+ public void testGetHeatDefaultTimeout() throws Exception {
+ ArtifactTypesInfo testSubject;
+ Integer result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getHeatDefaultTimeout();
+ }
+
+
+ @Test
+ public void testSetHeatDefaultTimeout() throws Exception {
+ ArtifactTypesInfo testSubject;
+ Integer heatDefaultTimeout = 0;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setHeatDefaultTimeout(heatDefaultTimeout);
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java
new file mode 100644
index 0000000000..db4d735a7e
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+public class DistributionStatusListResponseTest {
+
+ private DistributionStatusListResponse createTestSubject() {
+ return new DistributionStatusListResponse();
+ }
+
+
+ @Test
+ public void testGetDistributionStatusList() throws Exception {
+ DistributionStatusListResponse testSubject;
+ List<DistributionStatusInfo> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDistributionStatusList();
+ }
+
+
+ @Test
+ public void testSetDistributionStatusList() throws Exception {
+ DistributionStatusListResponse testSubject;
+ List<DistributionStatusInfo> distribStatusInfoList = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDistributionStatusList(distribStatusInfoList);
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java
new file mode 100644
index 0000000000..830292a66f
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class DistributionStatusOfServiceListResponceTest {
+
+ private DistributionStatusOfServiceListResponce createTestSubject() {
+ return new DistributionStatusOfServiceListResponce();
+ }
+
+
+ @Test
+ public void testGetDistributionStatusOfServiceList() throws Exception {
+ DistributionStatusOfServiceListResponce testSubject;
+ List<DistributionStatusOfServiceInfo> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDistributionStatusOfServiceList();
+ }
+
+
+ @Test
+ public void testSetDistributionStatusOfServiceList() throws Exception {
+ DistributionStatusOfServiceListResponce testSubject;
+ List<DistributionStatusOfServiceInfo> distribStatusOfServiceInfoList = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDistributionStatusOfServiceList(distribStatusOfServiceInfoList);
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java
new file mode 100644
index 0000000000..085583aa2d
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class ServicesWrapperTest {
+
+ private ServicesWrapper createTestSubject() {
+ return new ServicesWrapper();
+ }
+
+
+ @Test
+ public void testGetServices() throws Exception {
+ ServicesWrapper testSubject;
+ List<ServiceInfo> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getServices();
+ }
+
+
+ @Test
+ public void testSetServices() throws Exception {
+ ServicesWrapper testSubject;
+ List<ServiceInfo> services = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setServices(services);
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java
new file mode 100644
index 0000000000..80ae443afe
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class ToscaNodeTypeInterfaceTest {
+
+ private ToscaNodeTypeInterface createTestSubject() {
+ return new ToscaNodeTypeInterface();
+ }
+
+
+ @Test
+ public void testGetScripts() throws Exception {
+ ToscaNodeTypeInterface testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getScripts();
+ }
+
+
+ @Test
+ public void testSetScripts() throws Exception {
+ ToscaNodeTypeInterface testSubject;
+ List<String> scripts = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setScripts(scripts);
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java
index 2b33fbd704..27963fa8cb 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java
@@ -20,31 +20,51 @@
package org.openecomp.sdc.be.servlets;
-import fj.data.Either;
-import org.apache.commons.codec.binary.Base64;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.sdc.be.model.UploadResourceInfo;
-import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.common.datastructure.Wrapper;
-import org.openecomp.sdc.exception.ResponseFormat;
-import org.slf4j.Logger;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
-import javax.ws.rs.core.Response;
+import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.glassfish.grizzly.servlet.ServletUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
+import org.openecomp.sdc.be.dao.api.ActionStatus;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.impl.ComponentsUtils;
+import org.openecomp.sdc.be.model.Resource;
+import org.openecomp.sdc.be.model.UploadResourceInfo;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.servlets.ResourceUploadServlet.ResourceAuthorityTypeEnum;
+import org.openecomp.sdc.common.datastructure.Wrapper;
+import org.openecomp.sdc.exception.ResponseFormat;
+import org.slf4j.Logger;
+
+import com.google.common.base.Supplier;
+import com.google.gson.Gson;
+
+import aj.org.objectweb.asm.Type;
+import fj.data.Either;
public class AbstractValidationsServletTest {
- private static AbstractValidationsServlet servlet = new AbstractValidationsServlet() {};
+ private static AbstractValidationsServlet servlet = new AbstractValidationsServlet() {
+ };
private static final String BASIC_TOSCA_TEMPLATE = "tosca_definitions_version: tosca_simple_yaml_%s";
@@ -53,6 +73,7 @@ public class AbstractValidationsServletTest {
servlet.initLog(mock(Logger.class));
}
+
@SuppressWarnings("unchecked")
@Test
public void testGetScarFromPayload() {
@@ -71,10 +92,12 @@ public class AbstractValidationsServletTest {
resourceInfo.setPayloadName(payloadName);
resourceInfo.setPayloadData(payloadData);
Method privateMethod = null;
- privateMethod = AbstractValidationsServlet.class.getDeclaredMethod("getScarFromPayload", UploadResourceInfo.class);
+ privateMethod = AbstractValidationsServlet.class.getDeclaredMethod("getScarFromPayload",
+ UploadResourceInfo.class);
privateMethod.setAccessible(true);
returnValue = (Either<Map<String, byte[]>, ResponseFormat>) privateMethod.invoke(servlet, resourceInfo);
- } catch (IOException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ } catch (IOException | NoSuchMethodException | SecurityException | IllegalAccessException
+ | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();
}
assertTrue(returnValue.isLeft());
@@ -87,13 +110,12 @@ public class AbstractValidationsServletTest {
Stream.of("1_0", "1_0_0", "1_1", "1_1_0").forEach(this::testValidToscaVersion);
}
-
- private void testValidToscaVersion(String version) {
+ private void testValidToscaVersion(String version) {
Wrapper<Response> responseWrapper = new Wrapper<>();
- servlet.validatePayloadIsTosca(responseWrapper, new UploadResourceInfo(), new User(), String.format(BASIC_TOSCA_TEMPLATE, version));
+ servlet.validatePayloadIsTosca(responseWrapper, new UploadResourceInfo(), new User(),
+ String.format(BASIC_TOSCA_TEMPLATE, version));
assertTrue(responseWrapper.isEmpty());
}
-
-
+
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java
new file mode 100644
index 0000000000..0cb9906dc4
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java
@@ -0,0 +1,171 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic;
+import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
+
+
+public class AdditionalInformationServletTest {
+
+ private AdditionalInformationServlet createTestSubject() {
+ return new AdditionalInformationServlet();
+ }
+
+
+ @Test
+ public void testCreateResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceAdditionalInformationLabel_1() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java
new file mode 100644
index 0000000000..b4d04f92a9
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java
@@ -0,0 +1,340 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+
+
+public class ArtifactServletTest {
+
+ private ArtifactServlet createTestSubject() {
+ return new ArtifactServlet();
+ }
+
+
+ @Test
+ public void testLoadArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadInformationArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateInformationArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateApiArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String origMd5 = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteApiArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String origMd5 = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteInformationalArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadServiceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadResourceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadResourceInstanceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String userId = "";
+ String origMd5 = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String artifactId = "";
+ String userId = "";
+ String origMd5 = "";
+ HttpServletRequest request = null;
+ String data = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateRIArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentArtifacts() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String artifactGroupType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentInstanceArtifacts() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactGroupType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java
new file mode 100644
index 0000000000..34a475882a
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java
@@ -0,0 +1,72 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.base.Equivalence.Wrapper;
+
+public class AttributeServletTest {
+
+ private AttributeServlet createTestSubject() {
+ return new AttributeServlet();
+ }
+
+
+ @Test
+ public void testCreateAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testBuildAttributeFromString() throws Exception {
+ AttributeServlet testSubject;String data = "";
+ Wrapper<PropertyDefinition> attributesWrapper = null;
+ Wrapper<ResponseFormat> errorWrapper = null;
+
+
+ // default test
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java
new file mode 100644
index 0000000000..52ee33fd74
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java
@@ -0,0 +1,309 @@
+package org.openecomp.sdc.be.servlets;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.api.ActionStatus;
+import org.openecomp.sdc.be.model.ComponentInstance;
+import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+public class ComponentInstanceServletTest {
+
+ private ComponentInstanceServlet createTestSubject() {
+ return new ComponentInstanceServlet();
+ }
+
+
+ @Test
+ public void testCreateComponentInstance() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String data = "";
+ String containerComponentId = "";
+ String containerComponentType = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateComponentInstanceMetadata() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String componentInstanceId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateMultipleComponentInstance() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ String componentInstanceJsonArray = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResourceInstance() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String resourceInstanceId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testAssociateRIToRI() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ String userId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDissociateRIFromRI() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String userId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateAndAssociateRIToRI() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceInstanceProperty() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ String componentInstanceId = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceInstanceInput() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ String componentInstanceId = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceInstanceAttribute() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ String componentInstanceId = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResourceInstanceProperty() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ String componentInstanceId = "";
+ String propertyId = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testChangeResourceInstanceVersion() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String componentInstanceId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroupInstanceProperty() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String componentId = "";
+ String containerComponentType = "";
+ String componentInstanceId = "";
+ String groupInstanceId = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetGroupArtifactById() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String groupInstId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetInstancePropertiesById() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String containerComponentType = "";
+ String containerComponentId = "";
+ String componentInstanceUniqueId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateServiceProxy() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String data = "";
+ String containerComponentId = "";
+ String containerComponentType = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteServiceProxy() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String containerComponentId = "";
+ String serviceProxyId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testChangeServiceProxyVersion() throws Exception {
+ ComponentInstanceServlet testSubject;
+ String containerComponentId = "";
+ String serviceProxyId = "";
+ String containerComponentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java
new file mode 100644
index 0000000000..3e97aa4cb0
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java
@@ -0,0 +1,144 @@
+package org.openecomp.sdc.be.servlets;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+
+public class ComponentServletTest {
+
+ private ComponentServlet createTestSubject() {
+ return new ComponentServlet();
+ }
+
+
+ @Test
+ public void testConformanceLevelValidation() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ String componentUuid = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetRequirementAndCapabilities() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetLatestVersionNotAbstractCheckoutComponents() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ HttpServletRequest request = null;
+ String internalComponentType = "";
+ List<String> componentUids = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetLatestVersionNotAbstractCheckoutComponentsByBody() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ HttpServletRequest request = null;
+ String internalComponentType = "";
+ String userId = "";
+ List<String> data = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetLatestVersionNotAbstractCheckoutComponentsIdesOnly() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ HttpServletRequest request = null;
+ String internalComponentType = "";
+ String userId = "";
+ String data = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentInstancesFilteredByPropertiesAndInputs() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ HttpServletRequest request = null;
+ String searchText = "";
+ String userId = "";
+ String data = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentDataFilteredByParams() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ List<String> dataParamsToReturn = null;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetFilteredComponentInstanceProperties() throws Exception {
+ ComponentServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ String propertyNameFragment = "";
+ List<String> resourceTypes = null;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java
new file mode 100644
index 0000000000..4f2ca19986
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java
@@ -0,0 +1,84 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.datastax.driver.core.Configuration;
+
+public class ConfigMgrServletTest {
+
+ private ConfigMgrServlet createTestSubject() {
+ return new ConfigMgrServlet();
+ }
+
+
+ @Test
+ public void testGetConfig() throws Exception {
+ ConfigMgrServlet testSubject;
+ HttpServletRequest request = null;
+ String type = "";
+ String result;
+
+ // test 1
+ testSubject = createTestSubject();
+ type = null;
+
+
+ // test 2
+ testSubject = createTestSubject();
+ type = "";
+
+ // test 3
+ testSubject = createTestSubject();
+ type = "configuration";
+ }
+
+
+ @Test
+ public void testSetConfig1() throws Exception {
+ ConfigMgrServlet testSubject;
+ HttpServletRequest request = null;
+ Configuration configuration = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testSetConfig2() throws Exception {
+ ConfigMgrServlet testSubject;
+ HttpServletRequest request = null;
+ Configuration configuration = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testSetConfig3() throws Exception {
+ ConfigMgrServlet testSubject;
+ HttpServletRequest request = null;
+ Configuration configuration = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testSetConfig4() throws Exception {
+ ConfigMgrServlet testSubject;
+ HttpServletRequest request = null;
+ Configuration configuration = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java
new file mode 100644
index 0000000000..adc996eb4c
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java
@@ -0,0 +1,24 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+
+public class ConfigServletTest {
+
+ private ConfigServlet createTestSubject() {
+ return new ConfigServlet();
+ }
+
+
+ @Test
+ public void testGetConfig() throws Exception {
+ ConfigServlet testSubject;
+ HttpServletRequest request = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java
new file mode 100644
index 0000000000..6360c5a76e
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java
@@ -0,0 +1,85 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.ConsumerBusinessLogic;
+import org.openecomp.sdc.be.model.ConsumerDefinition;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+public class ConsumerServletTest {
+
+ private ConsumerServlet createTestSubject() {
+ return new ConsumerServlet();
+ }
+
+
+ @Test
+ public void testCreateConsumer() throws Exception {
+ ConsumerServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetConsumer() throws Exception {
+ ConsumerServlet testSubject;
+ String consumerId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteConsumer() throws Exception {
+ ConsumerServlet testSubject;
+ String consumerId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetConsumerBL() throws Exception {
+ ConsumerServlet testSubject;
+ ServletContext context = null;
+ ConsumerBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testConvertJsonToObject() throws Exception {
+ ConsumerServlet testSubject;
+ String data = "";
+ User user = null;
+ AuditingActionEnum actionEnum = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java
index daacb79de5..e80016a678 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java
@@ -8,6 +8,8 @@ import org.junit.Test;
import org.openecomp.sdc.be.resources.data.ESArtifactData;
import ch.qos.logback.classic.Logger;
+import java.util.*;
+import org.junit.Assert;
public class CsarBuildServletTest {
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java
new file mode 100644
index 0000000000..2233b4ebac
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java
@@ -0,0 +1,63 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.DistributionMonitoringBusinessLogic;
+
+public class DistributionServiceServletTest {
+
+ private DistributionServiceServlet createTestSubject() {
+ return new DistributionServiceServlet();
+ }
+
+
+ @Test
+ public void testGetServiceById() throws Exception {
+ DistributionServiceServlet testSubject;
+ String serviceUUID = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetListOfDistributionStatuses() throws Exception {
+ DistributionServiceServlet testSubject;
+ String did = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testInit() throws Exception {
+ DistributionServiceServlet testSubject;
+ HttpServletRequest request = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetDistributionBL() throws Exception {
+ DistributionServiceServlet testSubject;
+ ServletContext context = null;
+ DistributionMonitoringBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java
new file mode 100644
index 0000000000..2fe68d3a90
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java
@@ -0,0 +1,244 @@
+package org.openecomp.sdc.be.servlets;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
+
+public class ElementServletTest {
+
+ private ElementServlet createTestSubject() {
+ return new ElementServlet();
+ }
+
+
+ @Test
+ public void testGetComponentCategories() throws Exception {
+ ElementServlet testSubject;
+ String componentType = "";
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllCategories() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateComponentCategory() throws Exception {
+ ElementServlet testSubject;
+ String componentType = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteComponentCategory() throws Exception {
+ ElementServlet testSubject;
+ String categoryUniqueId = "";
+ String componentType = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateComponentSubCategory() throws Exception {
+ ElementServlet testSubject;
+ String componentType = "";
+ String categoryId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteComponentSubCategory() throws Exception {
+ ElementServlet testSubject;
+ String categoryUniqueId = "";
+ String subCategoryUniqueId = "";
+ String componentType = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateComponentGrouping() throws Exception {
+ ElementServlet testSubject;
+ String componentType = "";
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteComponentGrouping() throws Exception {
+ ElementServlet testSubject;
+ String grandParentCategoryUniqueId = "";
+ String parentSubCategoryUniqueId = "";
+ String groupingUniqueId = "";
+ String componentType = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetTags() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetPropertyScopes() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetArtifactTypes() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetConfiguration() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetFollowedResourcesServices() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCatalogComponents() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ List<OriginTypeEnum> excludeTypes = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteMarkedResources() throws Exception {
+ ElementServlet testSubject;
+ String componentType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetListOfCsars() throws Exception {
+ ElementServlet testSubject;
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java
new file mode 100644
index 0000000000..85b835076b
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java
@@ -0,0 +1,44 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+
+public class GroupServletTest {
+
+ private GroupServlet createTestSubject() {
+ return new GroupServlet();
+ }
+
+
+ @Test
+ public void testGetGroupArtifactById() throws Exception {
+ GroupServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String groupId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testUpdateGroupMetadata() throws Exception {
+ GroupServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String groupUniqueId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java
new file mode 100644
index 0000000000..9cc13d32de
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java
@@ -0,0 +1,167 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.InputsBusinessLogic;
+import org.openecomp.sdc.be.model.ComponentInstInputsMap;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+public class InputsServletTest {
+
+ private InputsServlet createTestSubject() {
+ return new InputsServlet();
+ }
+
+
+ @Test
+ public void testGetComponentInputs() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ HttpServletRequest request = null;
+ String fromName = "";
+ int amount = 0;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateComponentInputs() throws Exception {
+ InputsServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetComponentInstanceInputs() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ String instanceId = "";
+ String originComonentUid = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetInputPropertiesForComponentInstance() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ String instanceId = "";
+ String inputId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetInputsForComponentInput() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ String inputId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetInputsAndPropertiesForComponentInput() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ String inputId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testParseToComponentInstanceMap() throws Exception {
+ InputsServlet testSubject;
+ String serviceJson = "";
+ User user = null;
+ Either<ComponentInstInputsMap, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testCreateMultipleInputs() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String componentInstInputsMapObj = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteInput() throws Exception {
+ InputsServlet testSubject;
+ String componentType = "";
+ String componentId = "";
+ String inputId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String componentInstInputsMapObj = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetInputBL() throws Exception {
+ InputsServlet testSubject;
+ ServletContext context = null;
+ InputsBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java
new file mode 100644
index 0000000000..f92e439c9a
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.LifeCycleTransitionEnum;
+import org.openecomp.sdc.be.model.User;
+
+import fj.data.Either;
+
+public class LifecycleServletTest {
+
+ private LifecycleServlet createTestSubject() {
+ return new LifecycleServlet();
+ }
+
+
+ @Test
+ public void testChangeResourceState() throws Exception {
+ LifecycleServlet testSubject;
+ String jsonChangeInfo = "";
+ String componentCollection = "";
+ String lifecycleTransition = "";
+ String componentId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateTransitionEnum() throws Exception {
+ LifecycleServlet testSubject;
+ String lifecycleTransition = "";
+ User user = null;
+ Either<LifeCycleTransitionEnum, Response> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java
new file mode 100644
index 0000000000..2376ceea32
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java
@@ -0,0 +1,93 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+
+public class ProductServletTest {
+
+ private ProductServlet createTestSubject() {
+ return new ProductServlet();
+ }
+
+
+ @Test
+ public void testCreateProduct() throws Exception {
+ ProductServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetProductById() throws Exception {
+ ProductServlet testSubject;
+ String productId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetServiceByNameAndVersion() throws Exception {
+ ProductServlet testSubject;
+ String productName = "";
+ String productVersion = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteProduct() throws Exception {
+ ProductServlet testSubject;
+ String productId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateProductMetadata() throws Exception {
+ ProductServlet testSubject;
+ String productId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateServiceName() throws Exception {
+ ProductServlet testSubject;
+ String productName = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java
new file mode 100644
index 0000000000..dd31364868
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java
@@ -0,0 +1,119 @@
+package org.openecomp.sdc.be.servlets;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.PropertyBusinessLogic;
+import org.openecomp.sdc.be.dao.api.ActionStatus;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+
+import com.google.common.collect.Multiset.Entry;
+
+import fj.data.Either;
+
+public class PropertyServletTest {
+
+ private PropertyServlet createTestSubject() {
+ return new PropertyServlet();
+ }
+
+
+ @Test
+ public void testCreateProperty() throws Exception {
+ PropertyServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetProperty() throws Exception {
+ PropertyServlet testSubject;
+ String resourceId = "";
+ String propertyId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteProperty() throws Exception {
+ PropertyServlet testSubject;
+ String resourceId = "";
+ String propertyId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateProperty() throws Exception {
+ PropertyServlet testSubject;
+ String resourceId = "";
+ String propertyId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetPropertyModel() throws Exception {
+ PropertyServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ Either<Map<String, PropertyDefinition>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+
+ @Test
+ public void testGetPropertyDefinitionJSONObject() throws Exception {
+ PropertyServlet testSubject;
+ PropertyDefinition propertyDefinition = null;
+ JSONObject result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetPropertyBL() throws Exception {
+ PropertyServlet testSubject;
+ ServletContext context = null;
+ PropertyBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java
new file mode 100644
index 0000000000..4407ec6577
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+
+public class RequirementsServletTest {
+
+ private RequirementsServlet createTestSubject() {
+ return new RequirementsServlet();
+ }
+
+
+ @Test
+ public void testUpdateRequirement() throws Exception {
+ RequirementsServlet testSubject;
+ String resourceId = "";
+ String requirementId = "";
+ String requirementData = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java
new file mode 100644
index 0000000000..b88a097412
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java
@@ -0,0 +1,54 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+
+import ch.qos.logback.classic.Logger;
+
+public class ResourceArtifactDownloadServletTest {
+
+ private ResourceArtifactDownloadServlet createTestSubject() {
+ return new ResourceArtifactDownloadServlet();
+ }
+
+
+ @Test
+ public void testGetResourceArtifactByName() throws Exception {
+ ResourceArtifactDownloadServlet testSubject;
+ String resourceName = "";
+ String resourceVersion = "";
+ String artifactName = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetResourceArtifactMetadata() throws Exception {
+ ResourceArtifactDownloadServlet testSubject;
+ String resourceName = "";
+ String resourceVersion = "";
+ String artifactName = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetLogger() throws Exception {
+ ResourceArtifactDownloadServlet testSubject;
+ Logger result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java
new file mode 100644
index 0000000000..1844cfe188
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java
@@ -0,0 +1,242 @@
+package org.openecomp.sdc.be.servlets;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.be.model.Resource;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.base.Equivalence.Wrapper;
+
+import fj.data.Either;
+
+public class ResourcesServletTest {
+
+ private ResourcesServlet createTestSubject() {
+ return new ResourcesServlet();
+ }
+
+
+ @Test
+ public void testCreateResource() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testIsUIImport() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testPerformUIImport() throws Exception {
+ ResourcesServlet testSubject;Wrapper<Response> responseWrapper = null;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String resourceUniqueId = "";
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testParseToResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceJson = "";
+ User user = null;
+ Either<Resource, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testParseToLightResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceJson = "";
+ User user = null;
+ Either<Resource, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResourceByNameAndVersion() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String version = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceById() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceByNameAndVersion() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String resourceVersion = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateResourceName() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String resourceType = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCertifiedAbstractResources() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCertifiedNotAbstractResources() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceMetadata() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResource() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String resourceId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testConvertMapToList() throws Exception {
+ Map<String, PropertyDefinition> properties = null;
+ List<PropertyDefinition> result;
+
+ // test 1
+ properties = null;
+
+ }
+
+
+ @Test
+ public void testGetResourceFromCsar() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ String csarUUID = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java
new file mode 100644
index 0000000000..7a21a231d8
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java
@@ -0,0 +1,266 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.base.Equivalence.Wrapper;
+import com.google.common.util.concurrent.Service;
+
+import fj.data.Either;
+
+public class ServiceServletTest {
+
+ private ServiceServlet createTestSubject() {
+ return new ServiceServlet();
+ }
+
+
+ @Test
+ public void testCreateService() throws Exception {
+ ServiceServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testParseToService() throws Exception {
+ ServiceServlet testSubject;
+ String serviceJson = "";
+ User user = null;
+ Either<Service, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateServiceName() throws Exception {
+ ServiceServlet testSubject;
+ String serviceName = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentAuditRecords() throws Exception {
+ ServiceServlet testSubject;
+ String componentType = "";
+ String componentUniqueId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testFillUUIDAndVersion() throws Exception {
+ ServiceServlet testSubject;Wrapper<Response> responseWrapper = null;
+ Wrapper<String> uuidWrapper = null;
+ Wrapper<String> versionWrapper = null;
+ User user = null;
+ ComponentTypeEnum componentTypeEnum = null;
+ String componentUniqueId = "";
+ ServletContext context = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testDeleteService() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteServiceByNameAndVersion() throws Exception {
+ ServiceServlet testSubject;
+ String serviceName = "";
+ String version = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateServiceMetadata() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroupInstancePropertyValues() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ String componentInstanceId = "";
+ String groupInstanceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetServiceById() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetServiceByNameAndVersion() throws Exception {
+ ServiceServlet testSubject;
+ String serviceName = "";
+ String serviceVersion = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateServiceDistributionState() throws Exception {
+ ServiceServlet testSubject;
+ LifecycleChangeInfoWithAction jsonChangeInfo = null;
+ String serviceId = "";
+ String state = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testActivateDistribution() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ String env = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testMarkDistributionAsDeployed() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ String did = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testTempUrlToBeDeleted() throws Exception {
+ ServiceServlet testSubject;
+ String serviceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadServiceArtifact() throws Exception {
+ ServiceServlet testSubject;
+ String artifactName = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testExecuteCommand() throws Exception {
+ ServiceServlet testSubject;
+ String artifactName = "";
+ Either<byte[], ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java
new file mode 100644
index 0000000000..94aaee2afc
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.servlets;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.impl.PropertyBusinessLogic;
+
+public class TypesFetchServletTest {
+
+ private TypesFetchServlet createTestSubject() {
+ return new TypesFetchServlet();
+ }
+
+
+ @Test
+ public void testGetAllDataTypesServlet() throws Exception {
+ TypesFetchServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetPropertyBL() throws Exception {
+ TypesFetchServlet testSubject;
+ ServletContext context = null;
+ PropertyBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java
index 420cbcca6b..8f4f57e836 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java
@@ -35,6 +35,8 @@ import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.tinkerpop.gremlin.structure.T;
import org.glassfish.grizzly.http.util.HttpStatus;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
import org.glassfish.jersey.client.ClientConfig;
@@ -55,16 +57,19 @@ import org.openecomp.sdc.be.impl.ServletUtils;
import org.openecomp.sdc.be.impl.WebAppContextWrapper;
import org.openecomp.sdc.be.model.CapabilityTypeDefinition;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.servlets.TypesUploadServlet;
import org.openecomp.sdc.be.user.Role;
import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.ConfigurationSource;
import org.openecomp.sdc.common.api.Constants;
+import org.openecomp.sdc.common.datastructure.FunctionalInterfaces.ConsumerTwoParam;
import org.openecomp.sdc.common.impl.ExternalConfiguration;
import org.openecomp.sdc.common.impl.FSConfigurationSource;
import org.openecomp.sdc.exception.ResponseFormat;
import org.springframework.web.context.WebApplicationContext;
+import com.google.common.base.Equivalence.Wrapper;
+import com.google.common.base.Supplier;
+
import fj.data.Either;
public class TypesUploadServletTest extends JerseyTest {
@@ -83,7 +88,8 @@ public class TypesUploadServletTest extends JerseyTest {
@BeforeClass
public static void setup() {
ExternalConfiguration.setAppName("catalog-be");
- when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR)).thenReturn(webAppContextWrapper);
+ when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR))
+ .thenReturn(webAppContextWrapper);
when(webAppContextWrapper.getWebAppContext(servletContext)).thenReturn(webApplicationContext);
when(webApplicationContext.getBean(CapabilityTypeImportManager.class)).thenReturn(importManager);
when(webApplicationContext.getBean(ServletUtils.class)).thenReturn(servletUtils);
@@ -106,11 +112,13 @@ public class TypesUploadServletTest extends JerseyTest {
List<CapabilityTypeDefinition> emptyList = new ArrayList<CapabilityTypeDefinition>();
Either<List<CapabilityTypeDefinition>, ResponseFormat> either = Either.left(emptyList);
when(importManager.createCapabilityTypes(Mockito.anyString())).thenReturn(either);
- FileDataBodyPart filePart = new FileDataBodyPart("capabilityTypeZip", new File("src/test/resources/types/capabilityTypes.zip"));
+ FileDataBodyPart filePart = new FileDataBodyPart("capabilityTypeZip",
+ new File("src/test/resources/types/capabilityTypes.zip"));
MultiPart multipartEntity = new FormDataMultiPart();
multipartEntity.bodyPart(filePart);
- Response response = target().path("/v1/catalog/uploadType/capability").request(MediaType.APPLICATION_JSON).post(Entity.entity(multipartEntity, MediaType.MULTIPART_FORM_DATA), Response.class);
+ Response response = target().path("/v1/catalog/uploadType/capability").request(MediaType.APPLICATION_JSON)
+ .post(Entity.entity(multipartEntity, MediaType.MULTIPART_FORM_DATA), Response.class);
assertTrue(response.getStatus() == HttpStatus.CREATED_201.getStatusCode());
@@ -137,7 +145,8 @@ public class TypesUploadServletTest extends JerseyTest {
when(request.getSession()).thenReturn(session);
when(session.getServletContext()).thenReturn(servletContext);
String appConfigDir = "src/test/resources/config/catalog-be";
- ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), appConfigDir);
+ ConfigurationSource configurationSource = new FSConfigurationSource(
+ ExternalConfiguration.getChangeListener(), appConfigDir);
ConfigurationManager configurationManager = new ConfigurationManager(configurationSource);
for (String mandatoryHeader : configurationManager.getConfiguration().getIdentificationHeaderFields()) {
@@ -145,10 +154,96 @@ public class TypesUploadServletTest extends JerseyTest {
}
- when(servletContext.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR)).thenReturn(configurationManager);
+ when(servletContext.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR))
+ .thenReturn(configurationManager);
}
});
return resourceConfig;
}
+
+ private TypesUploadServlet createTestSubject() {
+ return new TypesUploadServlet();
+ }
+
+
+ @Test
+ public void testUploadCapabilityType() throws Exception {
+ TypesUploadServlet testSubject;
+ File file = null;
+ HttpServletRequest request = null;
+ String creator = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUploadInterfaceLifecycleType() throws Exception {
+ TypesUploadServlet testSubject;
+ File file = null;
+ HttpServletRequest request = null;
+ String creator = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUploadCategories() throws Exception {
+ TypesUploadServlet testSubject;
+ File file = null;
+ HttpServletRequest request = null;
+ String creator = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUploadDataTypes() throws Exception {
+ TypesUploadServlet testSubject;
+ File file = null;
+ HttpServletRequest request = null;
+ String creator = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUploadGroupTypes() throws Exception {
+ TypesUploadServlet testSubject;
+ File file = null;
+ HttpServletRequest request = null;
+ String creator = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUploadPolicyTypes() throws Exception {
+ TypesUploadServlet testSubject;
+ File file = null;
+ HttpServletRequest request = null;
+ String creator = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java
index ed69f104d2..6fd930c684 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java
@@ -30,19 +30,21 @@ import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.ws.rs.core.Application;
+import javax.ws.rs.core.Response;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
+import org.junit.Test;
import org.openecomp.sdc.be.auditing.impl.AuditingManager;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.dao.utils.UserStatusEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.WebAppContextWrapper;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.servlets.UserAdminServlet;
import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.api.UserRoleEnum;
@@ -75,7 +77,8 @@ public class UserAdminServletTest extends JerseyTest {
ExternalConfiguration.setAppName("catalog-be");
when(session.getServletContext()).thenReturn(servletContext);
- when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR)).thenReturn(webAppContextWrapper);
+ when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR))
+ .thenReturn(webAppContextWrapper);
when(webAppContextWrapper.getWebAppContext(servletContext)).thenReturn(webApplicationContext);
when(webApplicationContext.getBean(UserBusinessLogic.class)).thenReturn(userAdminManager);
@@ -97,26 +100,52 @@ public class UserAdminServletTest extends JerseyTest {
}
/*
- * @Test public void deactivateUserSuccessfullyTest(){ String userToDeleteUserId = "admin1"; User adminUser = new User(); adminUser.setUserId(ADMIN_ATT_UID); Either<User, ActionStatus> eitherActiveUser = buildEitherUser(userToDeleteUserId, true);
- * User userToDelete = eitherActiveUser.left().value(); doReturn(eitherActiveUser).when(userAdminManager).getUser( userToDeleteUserId);
+ * @Test public void deactivateUserSuccessfullyTest(){ String
+ * userToDeleteUserId = "admin1"; User adminUser = new User();
+ * adminUser.setUserId(ADMIN_ATT_UID); Either<User, ActionStatus>
+ * eitherActiveUser = buildEitherUser(userToDeleteUserId, true); User
+ * userToDelete = eitherActiveUser.left().value();
+ * doReturn(eitherActiveUser).when(userAdminManager).getUser(
+ * userToDeleteUserId);
*
- * Either<User, ActionStatus> eitherInactiveUser = buildEitherUser(userToDeleteUserId, false); doReturn(eitherInactiveUser).when(userAdminManager).deActivateUser( adminUser, userToDelete.getUserId());
+ * Either<User, ActionStatus> eitherInactiveUser =
+ * buildEitherUser(userToDeleteUserId, false);
+ * doReturn(eitherInactiveUser).when(userAdminManager).deActivateUser(
+ * adminUser, userToDelete.getUserId());
*
*
- * Response response = target().path("/v1/user/"+userToDeleteUserId).request().delete(); assertTrue(response.getStatus() == HttpStatus.OK.value()); verify(userAdminManager, times(1)).deActivateUser(adminUser, userToDelete.getUserId()); }
+ * Response response =
+ * target().path("/v1/user/"+userToDeleteUserId).request().delete();
+ * assertTrue(response.getStatus() == HttpStatus.OK.value());
+ * verify(userAdminManager, times(1)).deActivateUser(adminUser,
+ * userToDelete.getUserId()); }
*
*
- * @Test public void forceDeleteUserSuccessfullyTest(){ String userToDeleteUserId = "admin1"; when(request.getHeader(User.FORCE_DELETE_HEADER_FLAG)).thenReturn(User. FORCE_DELETE_HEADER_FLAG);
+ * @Test public void forceDeleteUserSuccessfullyTest(){ String
+ * userToDeleteUserId = "admin1";
+ * when(request.getHeader(User.FORCE_DELETE_HEADER_FLAG)).thenReturn(User.
+ * FORCE_DELETE_HEADER_FLAG);
*
* User adminUser = new User(); adminUser.setUserId(ADMIN_ATT_UID);
*
- * Either<User, ActionStatus> eitherActiveUser = buildEitherUser(userToDeleteUserId, true); User userToDelete = eitherActiveUser.left().value(); doReturn(eitherActiveUser).when(userAdminManager).getUser( userToDeleteUserId);
+ * Either<User, ActionStatus> eitherActiveUser =
+ * buildEitherUser(userToDeleteUserId, true); User userToDelete =
+ * eitherActiveUser.left().value();
+ * doReturn(eitherActiveUser).when(userAdminManager).getUser(
+ * userToDeleteUserId);
*
- * Either<User, ActionStatus> eitherUser = buildEitherUser(userToDeleteUserId, true); doReturn(eitherUser).when(userAdminManager).deleteUser(userToDelete. getUserId());
+ * Either<User, ActionStatus> eitherUser =
+ * buildEitherUser(userToDeleteUserId, true);
+ * doReturn(eitherUser).when(userAdminManager).deleteUser(userToDelete.
+ * getUserId());
*
*
- * Response response = target().path("/v1/user/"+userToDeleteUserId).request().delete(); assertTrue(response.getStatus() == HttpStatus.OK.value()); verify(userAdminManager, times(0)).deActivateUser(adminUser, userToDelete.getUserId());
- * verify(userAdminManager, times(1)).deleteUser(userToDelete.getUserId()); }
+ * Response response =
+ * target().path("/v1/user/"+userToDeleteUserId).request().delete();
+ * assertTrue(response.getStatus() == HttpStatus.OK.value());
+ * verify(userAdminManager, times(0)).deActivateUser(adminUser,
+ * userToDelete.getUserId()); verify(userAdminManager,
+ * times(1)).deleteUser(userToDelete.getUserId()); }
*/
@Override
@@ -145,4 +174,117 @@ public class UserAdminServletTest extends JerseyTest {
return Either.left(user);
}
+ private UserAdminServlet createTestSubject() {
+ return new UserAdminServlet();
+ }
+
+
+ @Test
+ public void testGet() throws Exception {
+ UserAdminServlet testSubject;
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetRole() throws Exception {
+ UserAdminServlet testSubject;
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateUserRole() throws Exception {
+ UserAdminServlet testSubject;
+ String userIdUpdateUser = "";
+ HttpServletRequest request = null;
+ String data = "";
+ String modifierUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testCreateUser() throws Exception {
+ UserAdminServlet testSubject;
+ HttpServletRequest request = null;
+ String newUserData = "";
+ String modifierAttId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testAuthorize() throws Exception {
+ UserAdminServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ String firstName = "";
+ String lastName = "";
+ String email = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAdminsUser() throws Exception {
+ UserAdminServlet testSubject;
+ String userId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetUsersList() throws Exception {
+ UserAdminServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ String roles = "";
+ Response result;
+
+ // test 1
+ testSubject = createTestSubject();
+ roles = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ roles = "";
+ }
+
+
+ @Test
+ public void testDeActivateUser() throws Exception {
+ UserAdminServlet testSubject;
+ String userId = "";
+ HttpServletRequest request = null;
+ String userIdHeader = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java
new file mode 100644
index 0000000000..f93819c0a1
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.be.switchover.detector;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class SwitchoverDetectorTest {
+
+ private SwitchoverDetector createTestSubject() {
+ return new SwitchoverDetector();
+ }
+
+
+ @Test
+ public void testGetSiteMode() throws Exception {
+ SwitchoverDetector testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getSiteMode();
+ }
+
+
+ @Test
+ public void testSetSiteMode() throws Exception {
+ SwitchoverDetector testSubject;
+ String mode = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setSiteMode(mode);
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java
new file mode 100644
index 0000000000..e6f1ac82fb
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java
@@ -0,0 +1,71 @@
+package org.openecomp.sdc.be.tosca;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.be.tosca.model.ToscaNodeType;
+import org.openecomp.sdc.be.tosca.model.ToscaProperty;
+
+import fj.data.Either;
+
+public class PropertyConvertorTest {
+
+ private PropertyConvertor createTestSubject() {
+ return new PropertyConvertor();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ PropertyConvertor result;
+
+ // default test
+ result = PropertyConvertor.getInstance();
+ }
+
+
+ @Test
+ public void testConvertProperties() throws Exception {
+ PropertyConvertor testSubject;
+ Component component = null;
+ ToscaNodeType toscaNodeType = null;
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Either<ToscaNodeType, ToscaError> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convertProperties(component, toscaNodeType, dataTypes);
+ }
+
+
+ @Test
+ public void testConvertProperty() throws Exception {
+ PropertyConvertor testSubject;
+ Map<String, DataTypeDefinition> dataTypes = null;
+ PropertyDefinition property = null;
+ boolean isCapabiltyProperty = false;
+ ToscaProperty result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testConvertToToscaObject() throws Exception {
+ PropertyConvertor testSubject;
+ String propertyType = "";
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java
new file mode 100644
index 0000000000..7cb2ef7cf8
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.be.tosca;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.tosca.model.ToscaTemplate;
+
+import fj.data.Either;
+
+public class ToscaExportHandlerTest {
+
+ private ToscaExportHandler createTestSubject() {
+ return new ToscaExportHandler();
+ }
+
+
+ @Test
+ public void testGetDependencies() throws Exception {
+ ToscaExportHandler testSubject;
+ Component component = null;
+ Either<ToscaTemplate, ToscaError> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetInterfaceFilename() throws Exception {
+ String artifactName = "";
+ String result;
+
+ // default test
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java
new file mode 100644
index 0000000000..c3a993596c
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java
@@ -0,0 +1,56 @@
+package org.openecomp.sdc.be.tosca;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.Component;
+
+import com.datastax.driver.core.UserType.Field;
+
+public class ToscaUtilsTest {
+
+ private ToscaUtils createTestSubject() {
+ return new ToscaUtils();
+ }
+
+
+ @Test
+ public void testIsAtomicType() throws Exception {
+ Component component = null;
+ boolean result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testIsComplexVfc() throws Exception {
+ Component component = null;
+ boolean result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testObjectToMap() throws Exception {
+ Object objectToConvert = null;
+ Class clazz = null;
+ Map<String, Object> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testGetAllFields() throws Exception {
+ List<Field> fields = null;
+ Class<?> type = null;
+ List<Field> result;
+
+ // default test
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java
deleted file mode 100644
index 4b01b4fd61..0000000000
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 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.user;
-
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.when;
-
-import org.junit.Before;
-import org.mockito.Mockito;
-import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.api.IUsersDAO;
-import org.openecomp.sdc.be.dao.impl.Neo4jUsersDAO;
-import org.openecomp.sdc.be.resources.data.UserData;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-import fj.data.Either;
-
-public class UserAdminManagerTest {
-
- final IUsersDAO usersDao = Mockito.mock(Neo4jUsersDAO.class);
- Gson gson;
-
- @Before
- public void setup() {
- Either<UserData, ActionStatus> eitherOk = Either.right(ActionStatus.OK);
- gson = new GsonBuilder().setPrettyPrinting().create();
- when(usersDao.getUserData(anyString())).thenReturn(eitherOk);
- when(usersDao.saveUserData((UserData) anyObject())).thenReturn(ActionStatus.OK);
- when(usersDao.updateUserData((UserData) anyObject())).thenReturn(ActionStatus.OK);
- when(usersDao.deleteUserData(anyString())).thenReturn(ActionStatus.OK);
- }
-
- // @Test
- // public void testCreateUser() {
- // String json = "{\"firstName\": \"James\",\"lastName\":
- // \"Brown\",\"userId\": \"jb1234u\",\"email\":
- // \"jb1234u@sdc.com\",\"role\": \"ADMIN\"}";
- // UserData user = gson.fromJson(json, UserData.class);
- // Either<UserData,ActionStatus> either =
- // UserAdminManager.getInstance().createUser(user);
- // assertTrue(either.isRight());
- // assertEquals(ActionStatus.OK, either.right().value());
- // }
- //
- //
- // @Test
- // public void testCreateUserInvalidEmail() {
- // String json = "{\"firstName\": \"James\",\"lastName\":
- // \"Brown\",\"userId\": \"jb1234u\",\"email\": \"@sdc.com\",\"role\":
- // \"ADMIN\"}";
- // UserData user = gson.fromJson(json, UserData.class);
- // Either<UserData,ActionStatus> either =
- // UserAdminManager.getInstance().createUser(user);
- // assertTrue(either.isRight());
- // assertEquals(ActionStatus.INVALID_EMAIL_ADDRESS, either.right().value());
- // }
- //
- // @Test
- // public void testCreateUserInvalidRole() {
- // String json = "{\"firstName\": \"James\",\"lastName\":
- // \"Brown\",\"userId\": \"jb1234u\",\"email\":
- // \"jb1234u@sdc.com\",\"role\": \"MIN\"}";
- // UserData user = gson.fromJson(json, UserData.class);
- // Either<UserData,ActionStatus> either =
- // UserAdminManager.getInstance().createUser(user);
- // assertTrue(either.isRight());
- // assertEquals(ActionStatus.INVALID_EMAIL_ADDRESS, either.right().value());
- // }
-
-}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java
new file mode 100644
index 0000000000..6558b140c7
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.sdc.common.transaction.mngr;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.common.transaction.api.RollbackHandler;
+import org.openecomp.sdc.common.transaction.api.TransactionUtils.DBActionCodeEnum;
+import org.openecomp.sdc.common.transaction.api.TransactionUtils.DBTypeEnum;
+import org.openecomp.sdc.common.util.MethodActivationStatusEnum;
+
+import fj.data.Either;
+
+public class RollbackManagerTest {
+
+ private RollbackManager createTestSubject() {
+ return new RollbackManager(null, "", "", null);
+ }
+
+
+ @Test
+ public void testTransactionRollback() throws Exception {
+ RollbackManager testSubject;
+ DBActionCodeEnum result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testAddRollbackHandler() throws Exception {
+ RollbackManager testSubject;
+ RollbackHandler rollbackHandler = null;
+ Either<RollbackHandler, MethodActivationStatusEnum> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testGetRollbackHandler() throws Exception {
+ RollbackManager testSubject;
+ DBTypeEnum dbType = null;
+ Either<RollbackHandler, MethodActivationStatusEnum> result;
+
+ // default test
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java
new file mode 100644
index 0000000000..aca9db39c0
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java
@@ -0,0 +1,54 @@
+package org.openecomp.sdc.common.transaction.mngr;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.common.transaction.api.ITransactionSdnc;
+import org.openecomp.sdc.common.transaction.api.TransactionUtils.ActionTypeEnum;
+
+public class TransactionManagerTest {
+
+ private TransactionManager createTestSubject() {
+ return new TransactionManager();
+ }
+
+
+ @Test
+ public void testGetTransaction() throws Exception {
+ TransactionManager testSubject;
+ String userId = "";
+ ActionTypeEnum actionType = null;
+ ITransactionSdnc result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGenerateTransactionID() throws Exception {
+ TransactionManager testSubject;
+ Integer result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testResetTransactionId() throws Exception {
+ TransactionManager testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testInit() throws Exception {
+ TransactionManager testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file