diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml
index 38b06f1..8482ae6 100755
--- a/vid-app-common/pom.xml
+++ b/vid-app-common/pom.xml
@@ -472,6 +472,12 @@
             <version>0.9.3</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.jeasy</groupId>
+            <artifactId>easy-random-core</artifactId>
+            <version>4.0.0.RC1</version>
+            <scope>test</scope>
+        </dependency>
 
         <!-- Helpers -->
         <dependency>
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java
index 83757f2..142bf73 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java
@@ -320,8 +320,6 @@
         return aaiClient.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor, equipModel);
     }
 
-
-
     @Override
     public AaiResponse getServices(RoleValidator roleValidator) {
         AaiResponse<GetServicesAAIRespone> subscriberResponse = aaiClient.getServices();
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java
index 097b05e..cbc79e8 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java
@@ -20,6 +20,7 @@
 
 package org.onap.vid.services;
 
+import java.util.List;
 import org.onap.vid.model.Workflow;
 import org.springframework.stereotype.Service;
 
@@ -31,29 +32,27 @@
 @Service
 public class WorkflowServiceImpl implements WorkflowService {
     //TODO: Add the list of workflows hard coded or from DB.
-    private ArrayList<Workflow> workflows = new ArrayList<>(Arrays.asList(
+    private List<Workflow> workflows = Arrays.asList(
             new Workflow(0, "Upgrade", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3", "VNF4"))),
             new Workflow(1, "Clean", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3"))),
             new Workflow(2, "Reinstall", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF4"))),
             new Workflow(3, "Dump", new ArrayList<>(Arrays.asList("VNF1", "VNF3", "VNF4"))),
             new Workflow(4, "Flush", new ArrayList<>(Arrays.asList("VNF2", "VNF3", "VNF4")))
-    ));
+    );
 
     @Override
     public Collection<String> getWorkflowsForVNFs(Collection<String> vnfNames) {
-        Collection<String> result = workflows.stream()
+        return workflows.stream()
                 .filter(workflow -> workflow.getVnfNames().containsAll(vnfNames))
-                .map(workflow -> workflow.getWorkflowName())
+                .map(Workflow::getWorkflowName)
                 .distinct()
                 .collect(Collectors.toList());
-
-        return result;
     }
 
     @Override
     public Collection<String> getAllWorkflows() {
         return workflows.stream()
-                .map(workflow -> workflow.getWorkflowName())
+                .map(Workflow::getWorkflowName)
                 .distinct()
                 .collect(Collectors.toList());
     }
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java
index 23951aa..59cee89 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java
@@ -8,9 +8,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,24 +23,36 @@
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import javax.ws.rs.core.Response;
+import org.jeasy.random.EasyRandom;
+import org.jeasy.random.EasyRandomParameters;
+import org.jeasy.random.randomizers.misc.BooleanRandomizer;
+import org.jeasy.random.randomizers.text.StringRandomizer;
 import org.junit.Test;
 import org.onap.vid.aai.AaiClientInterface;
 import org.onap.vid.aai.AaiGetVnfResponse;
 import org.onap.vid.aai.AaiOverTLSClientInterface;
 import org.onap.vid.aai.AaiResponse;
 import org.onap.vid.aai.AaiResponseTranslator;
+import org.onap.vid.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone;
 import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
 import org.onap.vid.aai.model.VnfResult;
 import org.onap.vid.roles.RoleValidator;
 
 public class AaiServiceImplTest {
 
+    private static final long STATIC_SEED = 5336L;
+    private EasyRandomParameters parameters = new EasyRandomParameters()
+        .randomize(String.class, new StringRandomizer(4, 4, STATIC_SEED))
+        .randomize(Boolean.class, new BooleanRandomizer(STATIC_SEED));
+    private EasyRandom modelGenerator = new EasyRandom(parameters);
+
     private AaiClientInterface aaiClient = mock(AaiClientInterface.class);
     private AaiOverTLSClientInterface aaiSslClient = mock(AaiOverTLSClientInterface.class);
     private AaiResponseTranslator aaiResponseTranslator = mock(AaiResponseTranslator.class);
@@ -185,4 +197,81 @@
         assertThat(response).isEqualTo(actual);
         assertThat(response.getT().results).containsOnly(genericVnf, serviceInstance);
     }
-}
+
+    @Test
+    @SuppressWarnings("unchecked")
+    public void getServicesShouldMarkAllServicesAsPermitted() {
+        // given
+        RoleValidator roleValidator = modelGenerator.nextObject(RoleValidator.class);
+
+        GetServicesAAIRespone inputPayload = modelGenerator.nextObject(GetServicesAAIRespone.class);
+        assertThat(inputPayload.service.stream().allMatch(service -> service.isPermitted)).isFalse();
+
+        when(aaiClient.getServices()).thenReturn(new AaiResponse<>(inputPayload, "", 200));
+
+        // when
+        AaiResponse<GetServicesAAIRespone> result = aaiService.getServices(roleValidator);
+        GetServicesAAIRespone outputPayload = result.getT();
+
+        // then
+        assertThat(outputPayload.service.stream().allMatch(service -> service.isPermitted)).isTrue();
+    }
+
+    @Test
+    public void shouldGetNodeTemplateInstances() {
+        // given
+        String globalCustomerId = "gcid";
+        String serviceType = "st";
+        String modelVersionId = "mvid";
+        String modelInvariantId = "miid";
+        String cloudRegion = "cr";
+
+        // when
+        aaiService
+            .getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion);
+
+        // then
+        verify(aaiClient)
+            .getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion);
+    }
+
+    @Test
+    public void shouldGetNetworkCollectionDetails() {
+        // given
+        String serviceInstanceId = "siid";
+
+        // when
+        aaiService.getNetworkCollectionDetails(serviceInstanceId);
+
+        // then
+        verify(aaiClient).getNetworkCollectionDetails(serviceInstanceId);
+    }
+
+    @Test
+    public void shouldGetInstanceGroupsByCloudRegion() {
+        // given
+        String cloudOwner = "co";
+        String cloudRegionId = "crid";
+        String networkFunction = "nf";
+
+        // when
+        aaiService.getInstanceGroupsByCloudRegion(cloudOwner, cloudRegionId, networkFunction);
+
+        // then
+        verify(aaiClient).getInstanceGroupsByCloudRegion(cloudOwner, cloudRegionId, networkFunction);
+    }
+
+    @Test
+    public void getAAIServiceTree() {
+        // given
+        String globalCustomerId = "gcid";
+        String serviceType = "st";
+        String serviceInstanceId = "siid";
+
+        // when
+        aaiService.getAAIServiceTree(globalCustomerId, serviceType, serviceInstanceId);
+
+        // then
+        verify(aaiServiceTree).getServiceInstanceTopology(globalCustomerId, serviceType, serviceInstanceId);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java
index a8ded27..fa53a9a 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java
@@ -3,13 +3,14 @@
  * VID
  * ================================================================================
  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 - 2020 Nokia. 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.
@@ -20,34 +21,23 @@
 
 package org.onap.vid.services;
 
-import java.util.*;
+import static org.assertj.core.api.Assertions.assertThat;
 
+import java.util.Arrays;
+import java.util.Collection;
 import org.junit.Test;
 
 public class WorkflowServiceImplTest {
 
-    private WorkflowServiceImpl createTestSubject() {
-        return new WorkflowServiceImpl();
+    @Test
+    public void testGetWorkflowsForVNFs() {
+        Collection<String> result = new WorkflowServiceImpl().getWorkflowsForVNFs(Arrays.asList("VNF1", "VNF2"));
+        assertThat(result).containsExactly("Upgrade", "Clean", "Reinstall");
     }
 
     @Test
-    public void testGetWorkflowsForVNFs() throws Exception {
-        WorkflowServiceImpl testSubject;
-        Collection<String> vnfNames = new ArrayList<String>();
-        Collection<String> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getWorkflowsForVNFs(vnfNames);
-    }
-
-    @Test
-    public void testGetAllWorkflows() throws Exception {
-        WorkflowServiceImpl testSubject;
-        Collection<String> result;
-
-        // default test
-        testSubject = createTestSubject();
-        result = testSubject.getAllWorkflows();
+    public void testGetAllWorkflows() {
+        Collection<String> result = new WorkflowServiceImpl().getAllWorkflows();
+        assertThat(result).containsExactly("Upgrade", "Clean", "Reinstall", "Dump", "Flush");
     }
 }
