diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessList.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessList.java
index 635a082..fa3a333 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessList.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessList.java
@@ -16,6 +16,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdc.be.info;
@@ -24,12 +26,14 @@
 
 public class ArtifactAccessList {
 
+    ArtifactAccessList() {}
+
+    private List<ArtifactAccessInfo> artifacts;
+
     public ArtifactAccessList(List<ArtifactAccessInfo> artifacts) {
         this.artifacts = artifacts;
     }
 
-    private List<ArtifactAccessInfo> artifacts;
-
     public List<ArtifactAccessInfo> getArtifacts() {
         return artifacts;
     }
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java
index bf257ee..dcb5f42 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java
@@ -16,6 +16,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdc.be.info;
@@ -31,13 +33,15 @@
     private String artifactVersion;
     private String artifactUUID;
 
+    ArtifactDefinitionInfo() {
+    }
+
     public ArtifactDefinitionInfo(ArtifactDefinition artifactDefinition) {
         uniqueId = artifactDefinition.getUniqueId();
         artifactName = artifactDefinition.getArtifactName();
         artifactDisplayName = artifactDefinition.getArtifactDisplayName();
         artifactVersion = artifactDefinition.getArtifactVersion();
         artifactUUID = artifactDefinition.getArtifactUUID();
-
     }
 
     public String getUniqueId() {
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java
index 89be01c..ad73636 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java
@@ -1,34 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2018 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
+ */
 package org.openecomp.sdc.be.info;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
 import java.util.List;
-
 import org.junit.Test;
 
-
 public class ArtifactAccessListTest {
 
-	private ArtifactAccessList createTestSubject() {
-		return new ArtifactAccessList(null);
+	@Test
+	public void shouldHaveValidGettersAndSetters() {
+		assertThat(ArtifactAccessList.class, hasValidGettersAndSetters());
 	}
 
 	@Test
-	public void testGetArtifacts() throws Exception {
-		ArtifactAccessList testSubject;
-		List<ArtifactAccessInfo> result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getArtifacts();
+	public void testCtor() {
+		List<ArtifactAccessInfo> artifacts = new ArrayList<>();
+		ArtifactAccessList artifactAccessList = new ArtifactAccessList(artifacts);
+		assertThat(artifactAccessList.getArtifacts(), is(artifacts));
 	}
 
-
-	@Test
-	public void testSetArtifacts() throws Exception {
-		ArtifactAccessList testSubject;
-		List<ArtifactAccessInfo> artifacts = null;
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setArtifacts(artifacts);
-	}
 }
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java
index b73874e..2811c15 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java
@@ -1,122 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2018 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
+ */
 package org.openecomp.sdc.be.info;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.openecomp.sdc.be.model.ArtifactDefinition;
 
-
+@RunWith(MockitoJUnitRunner.Silent.class)
 public class ArtifactDefinitionInfoTest {
 
-	private ArtifactDefinitionInfo createTestSubject() {
-		return new ArtifactDefinitionInfo(new ArtifactDefinition());
-	}
+	@Mock
+	private ArtifactDefinition artifactDefinition;
 
-	
+	private static final String VERSION = "VERSION";
+	private static final String DISPLAY_NAME = "DISPLAY NAME";
+	private static final String UUID = "1";
+	private static final byte[] PAYLOAD_DATA = "Test".getBytes();
+	private static final String NAME = "Name";
+
 	@Test
-	public void testGetUniqueId() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getUniqueId();
+	public void shouldHaveValidGettersAndSetters() {
+		assertThat(ArtifactDefinitionInfo.class, hasValidGettersAndSetters());
 	}
 
-	
 	@Test
-	public void testSetUniqueId() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String uniqueId = "";
+	public void testCtor() {
+		Mockito.when(artifactDefinition.getPayloadData()).thenReturn(PAYLOAD_DATA);
+		Mockito.when(artifactDefinition.getArtifactName()).thenReturn(NAME);
+		Mockito.when(artifactDefinition.getArtifactDisplayName()).thenReturn(DISPLAY_NAME);
+		Mockito.when(artifactDefinition.getArtifactVersion()).thenReturn(VERSION);
+		Mockito.when(artifactDefinition.getArtifactUUID()).thenReturn(UUID);
 
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setUniqueId(uniqueId);
+		ArtifactDefinitionInfo artifactDefinitionInfo = new ArtifactDefinitionInfo(artifactDefinition);
+		assertThat(artifactDefinitionInfo.getArtifactDisplayName(), is(DISPLAY_NAME));
+		assertThat(artifactDefinitionInfo.getArtifactName(), is(NAME));
+		assertThat(artifactDefinitionInfo.getArtifactVersion(), is(VERSION));
+		assertThat(artifactDefinitionInfo.getArtifactUUID(), is(UUID));
+
 	}
 
-	
-	@Test
-	public void testGetArtifactName() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String result;
 
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getArtifactName();
-	}
-
-	
-	@Test
-	public void testSetArtifactName() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String artifactName = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setArtifactName(artifactName);
-	}
-
-	
-	@Test
-	public void testGetArtifactDisplayName() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getArtifactDisplayName();
-	}
-
-	
-	@Test
-	public void testSetArtifactDisplayName() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String artifactDisplayName = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setArtifactDisplayName(artifactDisplayName);
-	}
-
-	
-	@Test
-	public void testGetArtifactVersion() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getArtifactVersion();
-	}
-
-	
-	@Test
-	public void testSetArtifactVersion() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String artifactVersion = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setArtifactVersion(artifactVersion);
-	}
-
-	
-	@Test
-	public void testGetArtifactUUID() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getArtifactUUID();
-	}
-
-	
-	@Test
-	public void testSetArtifactUUID() throws Exception {
-		ArtifactDefinitionInfo testSubject;
-		String artifactUUID = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setArtifactUUID(artifactUUID);
-	}
 }
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java
index 8b820ea..5991341 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java
@@ -1,186 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2018 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
+ */
 package org.openecomp.sdc.be.info;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 import java.util.LinkedList;
 import java.util.List;
 
 import org.junit.Test;
 
-
 public class ArtifactTemplateInfoTest {
 
-	private ArtifactTemplateInfo createTestSubject() {
-		return new ArtifactTemplateInfo();
+	private static final String TYPE = "TYPE";
+	private static final String FILENAME = "FILENAME";
+	private static final String ENV = "ENV";
+
+	@Test
+	public void shouldHaveValidGettersAndSetters() {
+		assertThat(ArtifactTemplateInfo.class, hasValidGettersAndSetters());
 	}
 
 	@Test
-	public void testCtor() throws Exception {
-		new ArtifactTemplateInfo("mock", "mock", "mock", new LinkedList<>());
+	public void testDefaultCtor() {
+		assertThat(ArtifactTemplateInfo.class, hasValidBeanConstructor());
 	}
-	
+
 	@Test
-	public void testGetType() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getType();
+	public void testCtor() {
+		List<ArtifactTemplateInfo> artifactsInfo = new LinkedList<>();
+		ArtifactTemplateInfo artifactTemplateInfo = new ArtifactTemplateInfo(TYPE, FILENAME, ENV, artifactsInfo);
+		assertThat(artifactTemplateInfo.getType(), is(TYPE));
+		assertThat(artifactTemplateInfo.getFileName(), is(FILENAME));
+		assertThat(artifactTemplateInfo.getEnv(), is(ENV));
+		assertThat(artifactTemplateInfo.getRelatedArtifactsInfo(), is(artifactsInfo));
 	}
 
-	
-	@Test
-	public void testSetType() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String type = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setType(type);
-	}
-
-	
-	@Test
-	public void testGetFileName() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getFileName();
-	}
-
-	
-	@Test
-	public void testSetFileName() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String fileName = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setFileName(fileName);
-	}
-
-	
-	@Test
-	public void testGetEnv() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getEnv();
-	}
-
-	
-	@Test
-	public void testSetEnv() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String env = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setEnv(env);
-	}
-
-	
-	@Test
-	public void testGetRelatedArtifactsInfo() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		List<ArtifactTemplateInfo> result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelatedArtifactsInfo();
-	}
-
-	
-	@Test
-	public void testSetRelatedArtifactsInfo() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		List<ArtifactTemplateInfo> relatedArtifactsInfo = null;
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelatedArtifactsInfo(relatedArtifactsInfo);
-	}
-
-	
-	@Test
-	public void testGetGroupName() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getGroupName();
-	}
-
-	
-	@Test
-	public void testSetGroupName() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String groupName = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setGroupName(groupName);
-	}
-
-	
-	@Test
-	public void testIsBase() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		boolean result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.isBase();
-	}
-
-	
-	@Test
-	public void testSetBase() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		boolean isBase = false;
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setBase(isBase);
-	}
-
-	
-	@Test
-	public void testGetDescription() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getDescription();
-	}
-
-	
-	@Test
-	public void testSetDescription() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String description = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setDescription(description);
-	}
-
-	
-	@Test
-	public void testToString() throws Exception {
-		ArtifactTemplateInfo testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.toString();
-	}
-
-	
-	
 }
\ No newline at end of file
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
index b129247..ba76898 100644
--- 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
@@ -1,14 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2018 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
+ */
 package org.openecomp.sdc.be.info;
 
+import org.junit.Assert;
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor;
 import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
 import static org.hamcrest.MatcherAssert.assertThat;
 
-
 public class ArtifactTypesInfoTest {
     @Test
     public void shouldHaveValidGettersAndSetters() {
         assertThat(ArtifactTypesInfo.class, hasValidGettersAndSetters());
     }
+
+    @Test
+    public void testDefaultCtor() {
+        Assert.assertThat(ArtifactTypesInfo.class, hasValidBeanConstructor());
+    }
 }
\ No newline at end of file
