diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml
index 7a48522..a42a2b3 100755
--- a/vid-app-common/pom.xml
+++ b/vid-app-common/pom.xml
@@ -347,6 +347,12 @@
 			<version>4.12</version>
 		</dependency>
 		<dependency>
+			<groupId>com.google.code.bean-matchers</groupId>
+			<artifactId>bean-matchers</artifactId>
+			<version>0.11</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
 			<groupId>org.json</groupId>
 			<artifactId>json</artifactId>
 			<version>20160212</version>
diff --git a/vid-app-common/src/test/java/org/onap/src/main/java/org/vid/dao/FnAppDoaImplTest.java b/vid-app-common/src/test/java/org/onap/src/main/java/org/vid/dao/FnAppDoaImplTest.java
deleted file mode 100644
index e98e7b2..0000000
--- a/vid-app-common/src/test/java/org/onap/src/main/java/org/vid/dao/FnAppDoaImplTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * 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.onap.src.main.java.org.vid.dao;
-
-import java.io.IOException;
-import java.sql.SQLException;
-
-import org.junit.Test;
-
-import org.onap.vid.dao.FnAppDoaImpl;
-
-public class FnAppDoaImplTest {
-	
-	//@Test
-	public void testGetconnection() throws ClassNotFoundException, IOException, SQLException{
-		FnAppDoaImpl impl=new FnAppDoaImpl();
-		impl.getConnection(null,null,null, null);
-		
-	}
-	
-	//@Test
-	public void testProfileCount() throws ClassNotFoundException, IOException, SQLException{
-		FnAppDoaImpl impl=new FnAppDoaImpl();
-		impl.getProfileCount(null,null,null, null);	
-	}
-
-}
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java
index 87d2bd8..28b939e 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java
@@ -1,33 +1,14 @@
 package org.onap.vid.aai.model.AaiGetOperationalEnvironments;
 
-import java.util.List;
-
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
 import org.junit.Test;
-import org.onap.vid.aai.OperationalEnvironment;
 
 public class OperationalEnvironmentListTest {
 
-    private OperationalEnvironmentList createTestSubject() {
-        return new OperationalEnvironmentList();
-    }
-
     @Test
-    public void testGetOperationalEnvironment() throws Exception {
-        OperationalEnvironmentList testSubject;
-        List<OperationalEnvironment> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getOperationalEnvironment();
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(OperationalEnvironmentList.class, hasValidGettersAndSetters());
     }
 
-    @Test
-    public void testSetOperationalEnvironment() throws Exception {
-        OperationalEnvironmentList testSubject;
-        List<OperationalEnvironment> operationalEnvironment = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setOperationalEnvironment(operationalEnvironment);
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfResponseTest.java
index bf248a3..7b5b8aa 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfResponseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfResponseTest.java
@@ -1,43 +1,41 @@
 package org.onap.vid.aai.model;
 
-import java.util.Map;
+import java.io.IOException;
+import java.util.ArrayList;
 
+import org.codehaus.jackson.map.ObjectMapper;
+import org.junit.Before;
 import org.junit.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+import static org.hamcrest.core.IsEqual.equalTo;
+
 public class AaiGetPnfResponseTest {
 
-    private AaiGetPnfResponse createTestSubject() {
-        return new AaiGetPnfResponse();
+    private AaiGetPnfResponse aaiGetPnfResponse;
+
+    @Before
+    public void setUp(){
+        aaiGetPnfResponse = new AaiGetPnfResponse();
+        aaiGetPnfResponse.results = new ArrayList<>();
+        aaiGetPnfResponse.setAdditionalProperty("key1", "value1");
+        aaiGetPnfResponse.setAdditionalProperty("key2", "value2");
     }
 
     @Test
-    public void testGetAdditionalProperties() throws Exception {
-        AaiGetPnfResponse testSubject;
-        Map<String, Object> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getAdditionalProperties();
+    public void shouldHaveValidGettersAndSetters() throws IOException {
+        String result = new ObjectMapper().writeValueAsString(aaiGetPnfResponse);
+        assertThat(result, containsString("key1"));
+        assertThat(result, containsString("value2"));
+        assertThat(result, containsString("key2"));
+        assertThat(result, containsString("value2"));
     }
 
     @Test
-    public void testSetAdditionalProperty() throws Exception {
-        AaiGetPnfResponse testSubject;
-        String name = "";
-        Object value = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setAdditionalProperty(name, value);
+    public void shouldHaveValidToString(){
+        assertThat(aaiGetPnfResponse.toString(),
+                equalTo("AaiGetPnfResponse{results=[], additionalProperties={key1=value1, key2=value2}}"));
     }
 
-    @Test
-    public void testToString() throws Exception {
-        AaiGetPnfResponse testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.toString();
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java
index 22aad6e..6f5a912 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java
@@ -2,149 +2,14 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class PnfTest {
 
-    private Pnf createTestSubject() {
-        return new Pnf();
-    }
-
     @Test
-    public void testGetPnfName() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getPnfName();
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(Pnf.class, hasValidGettersAndSetters());
     }
 
-    @Test
-    public void testSetPnfName() throws Exception {
-        Pnf testSubject;
-        String pnfName = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setPnfName(pnfName);
-    }
-
-    @Test
-    public void testGetEquipType() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getEquipType();
-    }
-
-    @Test
-    public void testSetEquipType() throws Exception {
-        Pnf testSubject;
-        String equipType = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setEquipType(equipType);
-    }
-
-    @Test
-    public void testGetEquipVendor() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getEquipVendor();
-    }
-
-    @Test
-    public void testSetEquipVendor() throws Exception {
-        Pnf testSubject;
-        String equipVendor = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setEquipVendor(equipVendor);
-    }
-
-    @Test
-    public void testGetPnfName2() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getPnfName2();
-    }
-
-    @Test
-    public void testSetPnfName2() throws Exception {
-        Pnf testSubject;
-        String pnfName2 = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setPnfName2(pnfName2);
-    }
-
-    @Test
-    public void testGetPnfId() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getPnfId();
-    }
-
-    @Test
-    public void testSetPnfId() throws Exception {
-        Pnf testSubject;
-        String pnfId = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setPnfId(pnfId);
-    }
-
-    @Test
-    public void testGetEquipModel() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getEquipModel();
-    }
-
-    @Test
-    public void testSetEquipModel() throws Exception {
-        Pnf testSubject;
-        String equipModel = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setEquipModel(equipModel);
-    }
-
-    @Test
-    public void testGetPnfName2Source() throws Exception {
-        Pnf testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getPnfName2Source();
-    }
-
-    @Test
-    public void testSetPnfName2Source() throws Exception {
-        Pnf testSubject;
-        String pnfName2Source = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setPnfName2Source(pnfName2Source);
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiRelationResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiRelationResponseTest.java
index d9f3fe5..3eaa75d 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiRelationResponseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiRelationResponseTest.java
@@ -2,49 +2,14 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class AaiRelationResponseTest {
 
-    private AaiRelationResponse createTestSubject() {
-        return new AaiRelationResponse();
-    }
-
     @Test
-    public void testGetResourceVersion() throws Exception {
-        AaiRelationResponse testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getResourceVersion();
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(AaiRelationResponse.class, hasValidGettersAndSetters());
     }
 
-    @Test
-    public void testSetResourceVersion() throws Exception {
-        AaiRelationResponse testSubject;
-        String resourceVersion = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setResourceVersion(resourceVersion);
-    }
-
-    @Test
-    public void testGetRelationshipList() throws Exception {
-        AaiRelationResponse testSubject;
-        RelationshipList result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getRelationshipList();
-    }
-
-    @Test
-    public void testSetRelationshipList() throws Exception {
-        AaiRelationResponse testSubject;
-        RelationshipList relationshipList = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setRelationshipList(relationshipList);
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponseTest.java
index 748a181..437f139 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponseTest.java
@@ -1,32 +1,15 @@
 package org.onap.vid.aai.model;
 
-import java.util.List;
-
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class GetServiceModelsByDistributionStatusResponseTest {
 
-    private GetServiceModelsByDistributionStatusResponse createTestSubject() {
-        return new GetServiceModelsByDistributionStatusResponse();
-    }
-
     @Test
-    public void testGetResults() throws Exception {
-        GetServiceModelsByDistributionStatusResponse testSubject;
-        List<Result> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getResults();
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(GetServiceModelsByDistributionStatusResponse.class, hasValidGettersAndSetters());
     }
 
-    @Test
-    public void testSetResults() throws Exception {
-        GetServiceModelsByDistributionStatusResponse testSubject;
-        List<Result> results = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setResults(results);
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/LogicalLinkResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/LogicalLinkResponseTest.java
index 99ee595..a2eb474 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/LogicalLinkResponseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/LogicalLinkResponseTest.java
@@ -2,6 +2,9 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class LogicalLinkResponseTest {
 
     private LogicalLinkResponse createTestSubject() {
@@ -9,122 +12,8 @@
     }
 
     @Test
-    public void testGetLinkName() throws Exception {
-        LogicalLinkResponse testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getLinkName();
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(LogicalLinkResponse.class, hasValidGettersAndSetters());
     }
 
-    @Test
-    public void testSetLinkName() throws Exception {
-        LogicalLinkResponse testSubject;
-        String linkName = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setLinkName(linkName);
-    }
-
-    @Test
-    public void testGetInMaint() throws Exception {
-        LogicalLinkResponse testSubject;
-        Boolean result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getInMaint();
-    }
-
-    @Test
-    public void testSetInMaint() throws Exception {
-        LogicalLinkResponse testSubject;
-        Boolean inMaint = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setInMaint(inMaint);
-    }
-
-    @Test
-    public void testGetLinkType() throws Exception {
-        LogicalLinkResponse testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getLinkType();
-    }
-
-    @Test
-    public void testSetLinkType() throws Exception {
-        LogicalLinkResponse testSubject;
-        String linkType = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setLinkType(linkType);
-    }
-
-    @Test
-    public void testGetResourceVersion() throws Exception {
-        LogicalLinkResponse testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getResourceVersion();
-    }
-
-    @Test
-    public void testSetResourceVersion() throws Exception {
-        LogicalLinkResponse testSubject;
-        String resourceVersion = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setResourceVersion(resourceVersion);
-    }
-
-    @Test
-    public void testGetPurpose() throws Exception {
-        LogicalLinkResponse testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getPurpose();
-    }
-
-    @Test
-    public void testSetPurpose() throws Exception {
-        LogicalLinkResponse testSubject;
-        String purpose = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setPurpose(purpose);
-    }
-
-    @Test
-    public void testGetRelationshipList() throws Exception {
-        LogicalLinkResponse testSubject;
-        RelationshipList result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getRelationshipList();
-    }
-
-    @Test
-    public void testSetRelationshipList() throws Exception {
-        LogicalLinkResponse testSubject;
-        RelationshipList relationshipList = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setRelationshipList(relationshipList);
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelTest.java
index 413c0b3..5b8d439 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelTest.java
@@ -2,89 +2,14 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ModelTest {
 
-    private Model createTestSubject() {
-        return new Model();
-    }
-
     @Test
-    public void testGetModelInvariantId() throws Exception {
-        Model testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelInvariantId();
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(Model.class, hasValidGettersAndSetters());
     }
 
-    @Test
-    public void testSetModelInvariantId() throws Exception {
-        Model testSubject;
-        String modelInvariantId = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelInvariantId(modelInvariantId);
-    }
-
-    @Test
-    public void testGetModelType() throws Exception {
-        Model testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelType();
-    }
-
-    @Test
-    public void testSetModelType() throws Exception {
-        Model testSubject;
-        String modelType = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelType(modelType);
-    }
-
-    @Test
-    public void testGetResourceVersion() throws Exception {
-        Model testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getResourceVersion();
-    }
-
-    @Test
-    public void testSetResourceVersion() throws Exception {
-        Model testSubject;
-        String resourceVersion = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setResourceVersion(resourceVersion);
-    }
-
-    @Test
-    public void testGetModelVers() throws Exception {
-        Model testSubject;
-        ModelVers result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelVers();
-    }
-
-    @Test
-    public void testSetModelVers() throws Exception {
-        Model testSubject;
-        ModelVers modelVers = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelVers(modelVers);
-    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVerTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVerTest.java
index 99a7a7a..46098ef 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVerTest.java
@@ -2,129 +2,13 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ModelVerTest {
 
-    private ModelVer createTestSubject() {
-        return new ModelVer();
-    }
-
     @Test
-    public void testGetModelVersionId() throws Exception {
-        ModelVer testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelVersionId();
-    }
-
-    @Test
-    public void testSetModelVersionId() throws Exception {
-        ModelVer testSubject;
-        String modelVersionId = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelVersionId(modelVersionId);
-    }
-
-    @Test
-    public void testGetModelName() throws Exception {
-        ModelVer testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelName();
-    }
-
-    @Test
-    public void testSetModelName() throws Exception {
-        ModelVer testSubject;
-        String modelName = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelName(modelName);
-    }
-
-    @Test
-    public void testGetModelVersion() throws Exception {
-        ModelVer testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelVersion();
-    }
-
-    @Test
-    public void testSetModelVersion() throws Exception {
-        ModelVer testSubject;
-        String modelVersion = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelVersion(modelVersion);
-    }
-
-    @Test
-    public void testGetDistributionStatus() throws Exception {
-        ModelVer testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getDistributionStatus();
-    }
-
-    @Test
-    public void testSetDistributionStatus() throws Exception {
-        ModelVer testSubject;
-        String distributionStatus = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setDistributionStatus(distributionStatus);
-    }
-
-    @Test
-    public void testGetResourceVersion() throws Exception {
-        ModelVer testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getResourceVersion();
-    }
-
-    @Test
-    public void testSetResourceVersion() throws Exception {
-        ModelVer testSubject;
-        String resourceVersion = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setResourceVersion(resourceVersion);
-    }
-
-    @Test
-    public void testGetModelDescription() throws Exception {
-        ModelVer testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelDescription();
-    }
-
-    @Test
-    public void testSetModelDescription() throws Exception {
-        ModelVer testSubject;
-        String modelDescription = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelDescription(modelDescription);
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(ModelVer.class, hasValidGettersAndSetters());
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVersTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVersTest.java
index 83bda0e..bea3b82 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVersTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ModelVersTest.java
@@ -1,32 +1,14 @@
 package org.onap.vid.aai.model;
 
-import java.util.List;
-
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ModelVersTest {
 
-    private ModelVers createTestSubject() {
-        return new ModelVers();
-    }
-
     @Test
-    public void testGetModelVer() throws Exception {
-        ModelVers testSubject;
-        List<ModelVer> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModelVer();
-    }
-
-    @Test
-    public void testSetModelVer() throws Exception {
-        ModelVers testSubject;
-        List<ModelVer> modelVer = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModelVer(modelVer);
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(ModelVers.class, hasValidGettersAndSetters());
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/OwningEntityTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/OwningEntityTest.java
index 1e160d2..9cb6a2f 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/OwningEntityTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/OwningEntityTest.java
@@ -2,49 +2,13 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class OwningEntityTest {
 
-    private OwningEntity createTestSubject() {
-        return new OwningEntity();
-    }
-
     @Test
-    public void testGetOwningEntityId() throws Exception {
-        OwningEntity testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getOwningEntityId();
-    }
-
-    @Test
-    public void testSetOwningEntityId() throws Exception {
-        OwningEntity testSubject;
-        String owningEntityId = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setOwningEntityId(owningEntityId);
-    }
-
-    @Test
-    public void testGetOwningEntityName() throws Exception {
-        OwningEntity testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getOwningEntityName();
-    }
-
-    @Test
-    public void testSetOwningEntityName() throws Exception {
-        OwningEntity testSubject;
-        String owningEntityName = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setOwningEntityName(owningEntityName);
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(OwningEntity.class, hasValidGettersAndSetters());
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfPropertiesTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfPropertiesTest.java
index 46709af..e2a62c0 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfPropertiesTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfPropertiesTest.java
@@ -1,33 +1,33 @@
 package org.onap.vid.aai.model;
 
-import java.util.Map;
-
+import org.codehaus.jackson.map.ObjectMapper;
+import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+
 public class PnfPropertiesTest {
 
-    private PnfProperties createTestSubject() {
-        return new PnfProperties();
+    private PnfProperties pnfProperties;
+
+    @Before
+    public void setUp(){
+        pnfProperties = new PnfProperties();
+        pnfProperties.setAdditionalProperty("key1", "value1");
+        pnfProperties.setAdditionalProperty("key2", "value2");
     }
 
     @Test
-    public void testGetAdditionalProperties() throws Exception {
-        PnfProperties testSubject;
-        Map<String, Object> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getAdditionalProperties();
-    }
-
-    @Test
-    public void testSetAdditionalProperty() throws Exception {
-        PnfProperties testSubject;
-        String name = "";
-        Object value = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setAdditionalProperty(name, value);
+    public void shouldHaveValidGettersAndSetters() throws IOException {
+        String result = new ObjectMapper().writeValueAsString(pnfProperties);
+        assertThat(result, containsString("key1"));
+        assertThat(result, containsString("value2"));
+        assertThat(result, containsString("key2"));
+        assertThat(result, containsString("value2"));
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfResultTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfResultTest.java
index 0f66df0..912eea9 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfResultTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/PnfResultTest.java
@@ -1,33 +1,31 @@
 package org.onap.vid.aai.model;
 
-import java.util.Map;
+import java.io.IOException;
 
+import org.codehaus.jackson.map.ObjectMapper;
+import org.junit.Before;
 import org.junit.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+
 public class PnfResultTest {
 
-    private PnfResult createTestSubject() {
-        return new PnfResult();
+    private PnfResult pnfResult;
+
+    @Before
+    public void setUp(){
+        pnfResult = new PnfResult();
+        pnfResult.setAdditionalProperty("key1", "value1");
+        pnfResult.setAdditionalProperty("key2", "value2");
     }
 
     @Test
-    public void testGetAdditionalProperties() throws Exception {
-        PnfResult testSubject;
-        Map<String, Object> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getAdditionalProperties();
-    }
-
-    @Test
-    public void testSetAdditionalProperty() throws Exception {
-        PnfResult testSubject;
-        String name = "";
-        Object value = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setAdditionalProperty(name, value);
+    public void shouldHaveValidGettersAndSetters() throws IOException {
+        String result = new ObjectMapper().writeValueAsString(pnfResult);
+        assertThat(result, containsString("key1"));
+        assertThat(result, containsString("value2"));
+        assertThat(result, containsString("key2"));
+        assertThat(result, containsString("value2"));
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectResponseTest.java
index 1784ea5..dc09609 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectResponseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectResponseTest.java
@@ -1,32 +1,14 @@
 package org.onap.vid.aai.model;
 
-import java.util.List;
-
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ProjectResponseTest {
 
-    private ProjectResponse createTestSubject() {
-        return new ProjectResponse();
-    }
-
     @Test
-    public void testGetProject() throws Exception {
-        ProjectResponse testSubject;
-        List<Project> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getProject();
-    }
-
-    @Test
-    public void testSetProject() throws Exception {
-        ProjectResponse testSubject;
-        List<Project> project = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setProject(project);
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(ProjectResponse.class, hasValidGettersAndSetters());
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectTest.java
index 8de772d..7d5637f 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ProjectTest.java
@@ -2,29 +2,13 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ProjectTest {
 
-    private Project createTestSubject() {
-        return new Project();
-    }
-
     @Test
-    public void testGetProjectName() throws Exception {
-        Project testSubject;
-        String result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getProjectName();
-    }
-
-    @Test
-    public void testSetProjectName() throws Exception {
-        Project testSubject;
-        String projectName = "";
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setProjectName(projectName);
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(Project.class, hasValidGettersAndSetters());
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/RelatedToPropertyTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/RelatedToPropertyTest.java
index 0d26f56..fd01e13 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/RelatedToPropertyTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/RelatedToPropertyTest.java
@@ -2,54 +2,13 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 public class RelatedToPropertyTest {
 
-	private RelatedToProperty createTestSubject() {
-		return new RelatedToProperty();
-	}
-
-
 	@Test
-	public void testGetPropertyKey() throws Exception {
-		RelatedToProperty testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getPropertyKey();
-	}
-
-
-	@Test
-	public void testSetPropertyKey() throws Exception {
-		RelatedToProperty testSubject;
-		String propertyKey = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setPropertyKey(propertyKey);
-	}
-
-
-	@Test
-	public void testGetPropertyValue() throws Exception {
-		RelatedToProperty testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getPropertyValue();
-	}
-
-
-	@Test
-	public void testSetPropertyValue() throws Exception {
-		RelatedToProperty testSubject;
-		String propertyValue = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setPropertyValue(propertyValue);
+	public void shouldHaveValidGettersAndSetters(){
+		assertThat(RelatedToProperty.class, hasValidGettersAndSetters());
 	}
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipDataTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipDataTest.java
index ae5f7c3..9e112f1 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipDataTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipDataTest.java
@@ -2,54 +2,14 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 
 public class RelationshipDataTest {
 
-	private RelationshipData createTestSubject() {
-		return new RelationshipData();
-	}
-
-
 	@Test
-	public void testGetRelationshipKey() throws Exception {
-		RelationshipData testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelationshipKey();
-	}
-
-
-	@Test
-	public void testSetRelationshipKey() throws Exception {
-		RelationshipData testSubject;
-		String relationshipKey = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelationshipKey(relationshipKey);
-	}
-
-
-	@Test
-	public void testGetRelationshipValue() throws Exception {
-		RelationshipData testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelationshipValue();
-	}
-
-
-	@Test
-	public void testSetRelationshipValue() throws Exception {
-		RelationshipData testSubject;
-		String relationshipValue = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelationshipValue(relationshipValue);
+	public void shouldHaveValidGettersAndSetters(){
+		assertThat(RelationshipData.class, hasValidGettersAndSetters());
 	}
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipTest.java
index 893fc51..7ae9ca5 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipTest.java
@@ -1,103 +1,15 @@
 package org.onap.vid.aai.model;
 
-import java.util.List;
-
 import org.junit.Test;
-import org.onap.vid.aai.model.Relationship;
-import org.onap.vid.aai.model.RelationshipData;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 
 public class RelationshipTest {
 
-	private Relationship createTestSubject() {
-		return new Relationship();
-	}
-
-
-	@Test
-	public void testGetRelatedTo() throws Exception {
-		Relationship testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelatedTo();
-	}
-
-
-	@Test
-	public void testSetRelatedTo() throws Exception {
-		Relationship testSubject;
-		String relatedTo = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelatedTo(relatedTo);
-	}
-
-
-	@Test
-	public void testGetRelatedLink() throws Exception {
-		Relationship testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelatedLink();
-	}
-
-
-	@Test
-	public void testSetRelatedLink() throws Exception {
-		Relationship testSubject;
-		String relatedLink = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelatedLink(relatedLink);
-	}
-
-
-	@Test
-	public void testGetRelationDataList() throws Exception {
-		Relationship testSubject;
-		List<RelationshipData> result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelationDataList();
-	}
-
-
-	@Test
-	public void testSetRelationDataList() throws Exception {
-		Relationship testSubject;
-		List<RelationshipData> relationDataList = null;
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelationDataList(relationDataList);
-	}
-
-
-	@Test
-	public void testGetRelatedToPropertyList() throws Exception {
-		Relationship testSubject;
-		List<RelatedToProperty> result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelatedToPropertyList();
-	}
-
-
-	@Test
-	public void testSetRelatedToPropertyList() throws Exception {
-		Relationship testSubject;
-		List<RelatedToProperty> relatedToPropertyList = null;
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelatedToPropertyList(relatedToPropertyList);
-	}
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Relationship.class, hasValidGettersAndSetters());
+    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ResultTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ResultTest.java
index 91d7763..9f71959 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ResultTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ResultTest.java
@@ -2,29 +2,13 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ResultTest {
 
-    private Result createTestSubject() {
-        return new Result();
-    }
-
     @Test
-    public void testGetModel() throws Exception {
-        Result testSubject;
-        Model result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getModel();
-    }
-
-    @Test
-    public void testSetModel() throws Exception {
-        Result testSubject;
-        Model model = null;
-
-        // default test
-        testSubject = createTestSubject();
-        testSubject.setModel(model);
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Result.class, hasValidGettersAndSetters());
     }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/ServiceRelationshipsTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/ServiceRelationshipsTest.java
index e8bcf5f..9b51ee1 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/model/ServiceRelationshipsTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/ServiceRelationshipsTest.java
@@ -2,164 +2,14 @@
 
 import org.junit.Test;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 
 public class ServiceRelationshipsTest {
 
-	private ServiceRelationships createTestSubject() {
-		return new ServiceRelationships();
-	}
-
-
-	@Test
-	public void testGetServiceInstanceId() throws Exception {
-		ServiceRelationships testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getServiceInstanceId();
-	}
-
-
-	@Test
-	public void testSetServiceInstanceId() throws Exception {
-		ServiceRelationships testSubject;
-		String serviceInstanceId = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setServiceInstanceId(serviceInstanceId);
-	}
-
-
-	@Test
-	public void testGetServiceInstanceName() throws Exception {
-		ServiceRelationships testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getServiceInstanceName();
-	}
-
-
-	@Test
-	public void testSetServiceInstanceName() throws Exception {
-		ServiceRelationships testSubject;
-		String serviceInstanceName = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setServiceInstanceName(serviceInstanceName);
-	}
-
-
-	@Test
-	public void testGetModelInvariantId() throws Exception {
-		ServiceRelationships testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getModelInvariantId();
-	}
-
-
-	@Test
-	public void testSetModelInvariantId() throws Exception {
-		ServiceRelationships testSubject;
-		String modelInvariantId = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setModelInvariantId(modelInvariantId);
-	}
-
-
-	@Test
-	public void testGetModelVersionId() throws Exception {
-		ServiceRelationships testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getModelVersionId();
-	}
-
-
-	@Test
-	public void testSetModelVersionId() throws Exception {
-		ServiceRelationships testSubject;
-		String modelVersionId = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setModelVersionId(modelVersionId);
-	}
-
-
-	@Test
-	public void testGetResourceVersion() throws Exception {
-		ServiceRelationships testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getResourceVersion();
-	}
-
-
-	@Test
-	public void testSetResourceVersion() throws Exception {
-		ServiceRelationships testSubject;
-		String resourceVersion = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setResourceVersion(resourceVersion);
-	}
-
-
-	@Test
-	public void testGetOrchestrationStatus() throws Exception {
-		ServiceRelationships testSubject;
-		String result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getOrchestrationStatus();
-	}
-
-
-	@Test
-	public void testSetOrchestrationStatus() throws Exception {
-		ServiceRelationships testSubject;
-		String orchestrationStatus = "";
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setOrchestrationStatus(orchestrationStatus);
-	}
-
-
-	@Test
-	public void testGetRelationshipList() throws Exception {
-		ServiceRelationships testSubject;
-		RelationshipList result;
-
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getRelationshipList();
-	}
-
-
-	@Test
-	public void testSetRelationshipList() throws Exception {
-		ServiceRelationships testSubject;
-		RelationshipList relationshipList = null;
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.setRelationshipList(relationshipList);
-	}
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ServiceRelationships.class, hasValidGettersAndSetters());
+    }
 }
\ No newline at end of file
