diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyParametersImplTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyParametersImplTest.java
new file mode 100644
index 0000000..e897e4f
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyParametersImplTest.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.policy;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.IdentifierMap;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.ServiceParameter;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.IdentifierMapRespository;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.ServiceParameterRepository;
+
+@RunWith(MockitoJUnitRunner.class)
+public class PolicyParametersImplTest {
+    @Mock
+    IdentifierMapRespository identifierMapRepository;
+    @Mock
+    ServiceParameterRepository serviceParameterRepository;
+    @Mock
+    IdentifierMap identifierMap;
+    @InjectMocks
+    PolicyParametersImpl policyParametersImpl;
+    @Mock
+    ServiceParameter sp;
+    
+    static final String RECIPE_SEPERATOR_PARAM = "recipe_separator";
+    static final String MAX_GEN_ATTEMPT_PARAM = "max_gen_attempt";
+
+    @Test
+    public void policyParameterTest() throws Exception {
+        Mockito.when(serviceParameterRepository.findByName(RECIPE_SEPERATOR_PARAM)).thenReturn(sp);
+        Mockito.when(sp.getValue()).thenReturn("value");
+        assertEquals("value", policyParametersImpl.getRecipeSeparator());
+
+        Mockito.when(identifierMapRepository.findByPolicyFnName("name")).thenReturn(identifierMap);
+        Mockito.when(identifierMap.getJsFnName()).thenReturn("jsFnName");
+        assertEquals("jsFnName", policyParametersImpl.mapFunction("name"));
+
+        Mockito.when(sp.getValue()).thenReturn("1");
+        Mockito.when(serviceParameterRepository.findByName(MAX_GEN_ATTEMPT_PARAM)).thenReturn(sp);
+        assertEquals(1, policyParametersImpl.getMaxGenAttempt());
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyPropertyMethodUtilsTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyPropertyMethodUtilsTest.java
new file mode 100644
index 0000000..f527b38
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyPropertyMethodUtilsTest.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.policy;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class PolicyPropertyMethodUtilsTest {
+
+    @Test
+    public void testAll() {
+        assertEquals("TRLAK", PolicyPropertyMethodUtils.substring("TRLAKDG", "5"));
+        assertEquals("KDG", PolicyPropertyMethodUtils.substring("TRLAKDG", "-3"));
+        assertEquals("TRLAKDG", PolicyPropertyMethodUtils.substring("TRLAKDG", "8"));
+        assertEquals("TRLAKDG", PolicyPropertyMethodUtils.substring("TRLAKDG", "-11"));
+        assertEquals("XYSZ1NNN", PolicyPropertyMethodUtils.toUpperCase("XySz1NNN"));
+        assertEquals("xysz1nnn", PolicyPropertyMethodUtils.toLowerCase("XySz1NNN"));
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyReaderTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyReaderTest.java
new file mode 100644
index 0000000..30fc6e4
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicyReaderTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.policy;
+
+import static org.junit.Assert.assertEquals;
+import static org.onap.ccsdk.apps.ms.neng.core.policy.PolicyReader.namingModels;
+
+import java.util.Map;
+import org.junit.Test;
+
+public class PolicyReaderTest {
+    @Test
+    public void getPolicyFromFile() throws Exception {
+        Map<String, Object> policy = new FilePolicyReader("sample_policy.json").getPolicy();
+        assertEquals("VNF", namingModels(policy).get(0).get("naming-type"));
+        assertEquals("COMPLEX|SEQUENCE|NF_NAMING_CODE", namingModels(policy).get(0).get("naming-recipe"));
+    }
+
+    @Test
+    public void relaxedNamingType() throws Exception {
+        assertEquals("VNF", PolicyReader.relaxedNamingType("VNF_NAME"));
+        assertEquals("VNF", PolicyReader.relaxedNamingType("VNF-NAME"));
+        assertEquals("VNF", PolicyReader.relaxedNamingType("vnf-name"));
+        assertEquals("VNF", PolicyReader.relaxedNamingType("vnf_name"));
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PropertyOperatorTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PropertyOperatorTest.java
new file mode 100644
index 0000000..9d6c3f9
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/PropertyOperatorTest.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.policy;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class PropertyOperatorTest {
+    @Mock
+    private PolicyParameters params = mock(PolicyParameters.class);
+
+    @Test
+    public void operationFunction() throws Exception {
+        assertEquals(null, PropertyOperator.operationFunction(""));
+        assertEquals(null, PropertyOperator.operationFunction("  "));
+
+        assertEquals(null, PropertyOperator.operationFunction("  (("));
+
+        assertEquals("to_lower_case", PropertyOperator.operationFunction("to_lower_case()"));
+        assertEquals("to_lower_case", PropertyOperator.operationFunction("  to_lower_case() "));
+
+        assertEquals("sub_str", PropertyOperator.operationFunction("sub_str(0,5)"));
+        assertEquals("sub_str", PropertyOperator.operationFunction("\tsub_str(0,5)"));
+    }
+
+    @Test
+    public void camelConverted() throws Exception {
+        assertEquals("", PropertyOperator.camelConverted(""));
+
+        assertEquals("toLowerCase", PropertyOperator.camelConverted("to_lower_case"));
+    }
+
+    @Test
+    public void applyToLowerCase() throws Exception {
+        Map<String, String> props = new HashMap<>();
+        props.put("property-operation", "to_lower_case()");
+        PropertyOperator op = new PropertyOperator();
+        assertEquals("asdf", op.apply("ASDF", props, params));
+    }
+
+    @Test
+    public void applyToUpperCase() throws Exception {
+        Map<String, String> props = new HashMap<>();
+        props.put("property-operation", "to_upper_case()");
+        PropertyOperator op = new PropertyOperator();
+        assertEquals("ASDF", op.apply("asdf", props, params));
+    }
+
+    @Test
+    public void applySubstr() throws Exception {
+        when(params.mapFunction("sub_str")).thenReturn("substring");
+        PropertyOperator op = new PropertyOperator();
+
+        Map<String, String> props = new HashMap<>();
+
+        props.put("property-operation", "sub_str(0,5)");
+        assertEquals("01234", op.apply("0123456789", props, params));
+
+        props.put("property-operation", "    sub_str(0,4)");
+        assertEquals("0123", op.apply("0123456789", props, params));
+
+        props.put("property-operation", "sub_str(1,5)");
+        assertEquals("1234", op.apply("0123456789", props, params));
+
+        props.put("property-operation", "sub_str(1)");
+        assertEquals("0", op.apply("0", props, params));
+
+        props.put("property-operation", "sub_str(-2)");
+        assertEquals("89", op.apply("0123456789", props, params));
+
+        props.put("property-operation", "sub_str(-3)");
+        assertEquals("789", op.apply("0123456789", props, params));
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/RecipeParserTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/RecipeParserTest.java
new file mode 100644
index 0000000..744d967
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/policy/RecipeParserTest.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.policy;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class RecipeParserTest {
+    @Mock
+    private PolicyParameters params = mock(PolicyParameters.class);
+
+    @Test
+    public void parseRecipe() throws Exception {
+        assertEquals(0, RecipeParser.parseRecipe(params, "").size());
+        assertEquals("[]", RecipeParser.parseRecipe(params, "").toString());
+
+        assertEquals(1, RecipeParser.parseRecipe(params, "a").size());
+        assertEquals("[a]", RecipeParser.parseRecipe(params, "a").toString());
+
+        assertEquals(2, RecipeParser.parseRecipe(params, "a,b").size());
+        assertEquals(2, RecipeParser.parseRecipe(params, "a|b").size());
+        assertEquals(2, RecipeParser.parseRecipe(params, "a:b").size());
+
+        assertEquals("[a, b]", RecipeParser.parseRecipe(params, "a,b").toString());
+        assertEquals("[a, b]", RecipeParser.parseRecipe(params, "a|b").toString());
+        assertEquals("[a, b]", RecipeParser.parseRecipe(params, "a:b").toString());
+
+        assertEquals(3, RecipeParser.parseRecipe(params, "a,b,c").size());
+        assertEquals(3, RecipeParser.parseRecipe(params, "a|b|c").size());
+        assertEquals(3, RecipeParser.parseRecipe(params, "a:b:c").size());
+
+        assertEquals("[a, b, c]", RecipeParser.parseRecipe(params, "a,b,c").toString());
+        assertEquals("[a, b, c]", RecipeParser.parseRecipe(params, "a|b|c").toString());
+        assertEquals("[a, b, c]", RecipeParser.parseRecipe(params, "a:b:c").toString());
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/rs/interceptors/AaiAuthorizationInterceptorTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/rs/interceptors/AaiAuthorizationInterceptorTest.java
new file mode 100644
index 0000000..40e507e
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/rs/interceptors/AaiAuthorizationInterceptorTest.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.rs.interceptors;
+
+import static org.junit.Assert.assertNotNull;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.header;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
+
+import java.net.URI;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigRequest;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigResponse;
+import org.onap.ccsdk.apps.ms.neng.extinf.props.AaiProps;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.RequestEntity;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.web.client.ExpectedCount;
+import org.springframework.test.web.client.MockRestServiceServer;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(MockitoJUnitRunner.class)
+public class AaiAuthorizationInterceptorTest {
+    MockRestServiceServer mockServer;
+    RestTemplate restTemplate;
+    String aaiHostName = "http://0.0.0.1:8080/";
+    String aaiPath = "services/service/networkInfrastructureResourcesSample/v1";
+
+    @InjectMocks
+    AaiAuthorizationInterceptor aaiAuthorizationInterceptor;
+    @Spy
+    AaiProps props = new AaiProps();
+
+    /**
+     * Does the setup.
+     */
+    @Before
+    public void setUp() {
+        if (restTemplate == null) {
+            restTemplate = new RestTemplate();
+        }
+        props.setAccept("application/json");
+        props.setCert("c:/certs");
+        props.setCertPassword("password");
+        props.setFromAppId("namegen-ms");
+        props.setUriBase("https://localhost:8080/aai/v13/");
+        props.setTransactionId("X12345YV");
+        restTemplate.getInterceptors().add(aaiAuthorizationInterceptor);
+        mockServer = MockRestServiceServer.bindTo(restTemplate).build();
+    }
+
+    @Test
+    public void testAuth() throws Exception {
+
+        mockServer.expect(ExpectedCount.once(), requestTo(aaiHostName + aaiPath)).andExpect(method(HttpMethod.POST))
+                        .andExpect(header("x-FromAppId", new String[] {"namegen-ms"}))
+                        .andRespond(withSuccess("", MediaType.APPLICATION_JSON));
+        GetConfigRequest req = new GetConfigRequest();
+        RequestEntity<GetConfigRequest> re = RequestEntity.post(new URI(aaiHostName + aaiPath))
+                        .accept(MediaType.APPLICATION_JSON).contentType(MediaType.APPLICATION_JSON).body(req);
+        ResponseEntity<GetConfigResponse> resp = restTemplate.exchange(re, GetConfigResponse.class);
+        mockServer.verify();
+        assertNotNull(resp);
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/rs/interceptors/PolicyManagerAuthorizationInterceptorTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/rs/interceptors/PolicyManagerAuthorizationInterceptorTest.java
new file mode 100644
index 0000000..d814c25
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/rs/interceptors/PolicyManagerAuthorizationInterceptorTest.java
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.rs.interceptors;
+
+import static org.junit.Assert.assertNotNull;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.header;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
+
+import java.net.URI;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigRequest;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigResponse;
+import org.onap.ccsdk.apps.ms.neng.extinf.props.PolicyManagerProps;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.RequestEntity;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.web.client.ExpectedCount;
+import org.springframework.test.web.client.MockRestServiceServer;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(MockitoJUnitRunner.class)
+public class PolicyManagerAuthorizationInterceptorTest {
+    MockRestServiceServer mockServer;
+    RestTemplate restTemplate;
+    String policyManagerHostname = "http://0.0.0.1:8080/";
+    String policyManagerResPath = "services/service/networkInfrastructureResourcesSample/v1";
+    @InjectMocks
+    PolicyManagerAuthorizationInterceptor policyManagerInterceptor;
+    @Spy
+    PolicyManagerProps props = new PolicyManagerProps();
+
+    /**
+     * Does the setup for tests.
+     */
+    @Before
+    public void setUp() {
+        if (restTemplate == null) {
+            restTemplate = new RestTemplate();
+        }
+        props.setBasicAuth("Basic bnVsbDpudWxs");
+        props.setClientAuth("Basic bnVsbDpudWxs");
+        props.setEcompRequestId("xxuv");
+        props.setEnvironment("TEST");
+        restTemplate.getInterceptors().add(policyManagerInterceptor);
+        mockServer = MockRestServiceServer.bindTo(restTemplate).build();
+    }
+
+    @Test
+    public void testAuth() throws Exception {
+        mockServer.expect(ExpectedCount.once(), requestTo(policyManagerHostname + policyManagerResPath))
+                        .andExpect(method(HttpMethod.POST))
+                        .andExpect(header("Authorization", new String[] {"Basic bnVsbDpudWxs"}))
+                        .andRespond(withSuccess("", MediaType.APPLICATION_JSON));
+        GetConfigRequest req = new GetConfigRequest();
+        RequestEntity<GetConfigRequest> re = RequestEntity.post(new URI(policyManagerHostname + policyManagerResPath))
+                        .accept(MediaType.APPLICATION_JSON).contentType(MediaType.APPLICATION_JSON).body(req);
+        ResponseEntity<GetConfigResponse> resp = restTemplate.exchange(re, GetConfigResponse.class);
+        mockServer.verify();
+        assertNotNull(resp);
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/seq/TestSequenceGenerator.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/seq/TestSequenceGenerator.java
new file mode 100644
index 0000000..fcee4da
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/seq/TestSequenceGenerator.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.seq;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.core.policy.PolicySequence;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.ServiceParameter;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.GeneratedNameRespository;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.ServiceParameterRepository;
+
+
+@RunWith(MockitoJUnitRunner.class)
+public class TestSequenceGenerator {
+    @Mock
+    private GeneratedNameRespository genNameRepo = mock(GeneratedNameRespository.class);
+    @Mock
+    private ServiceParameterRepository servParamRepo = mock(ServiceParameterRepository.class);
+    @Mock
+    private PolicySequence params = mock(PolicySequence.class);
+    @Mock
+    private ServiceParameter sp = mock(ServiceParameter.class);
+    @InjectMocks
+    SequenceGenerator sg;
+
+    @Test
+    public void testGenerate() throws Exception {
+        assertEquals(0, sg.generate("zSSRX1234", null, params, null, 1));
+        
+        Mockito.when(params.getLastReleaseSeqNumTried()).thenReturn(null);
+        Mockito.when(genNameRepo.findMaxByPrefixAndSuffix("zSSRX1234", null)).thenReturn("4");
+
+        assertEquals(0, sg.generate("zSSRX1234", null, params, null, 1));
+
+        Mockito.when(genNameRepo.findMaxByPrefixAndSuffix("zSSRX1234", null)).thenReturn("2");
+        Mockito.when(genNameRepo.findMaxByPrefixAndSuffix("zSSRX1234", null)).thenReturn(null);
+        Mockito.when(servParamRepo.findByName("initial_increment")).thenReturn(sp);
+        Mockito.when(sp.getValue()).thenReturn("1");
+
+        assertEquals(0, sg.generate("zSSRX1234", null, params, 1L, 2));
+
+        Mockito.when(genNameRepo.findNextReleasedSeq(0L, "zSSRX1234", null)).thenReturn(null);
+        assertEquals(0, sg.generate("zSSRX1234", null, params, null, 1));
+    }
+
+    @Test(expected = Exception.class)
+    public void exceltionTest() throws Exception {
+        Mockito.when(genNameRepo.findNextReleasedSeq(1L, "zSSRX1234", null)).thenReturn(null);
+        Mockito.when(params.getLastReleaseSeqNumTried()).thenReturn(1L);
+        sg.generate("zSSRX1234", null, params, null, 1);
+    }
+
+    @Test
+    public void testAlreadyUsedSequesnce() throws Exception {
+        Mockito.when(genNameRepo.findMaxByPrefixAndSuffix("zSSRX1234", null)).thenReturn("1");
+        Mockito.when(sp.getValue()).thenReturn("4");
+        Mockito.when(params.getIncrement()).thenReturn(2L);
+        assertEquals(0L, sg.generate("zSSRX1234", null, params, 2L, 0));
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/HelloTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/HelloTest.java
new file mode 100644
index 0000000..1c5fa81
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/HelloTest.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.service;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.ws.rs.core.Response;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.ccsdk.apps.ms.neng.core.service.rs.RestService;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.GeneratedNameRespository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.WebAppConfiguration;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@EnableAutoConfiguration
+@WebAppConfiguration
+@SpringBootTest
+@ActiveProfiles("test")
+public class HelloTest {
+    @Autowired
+    RestService service;
+    @Autowired
+    GeneratedNameRespository repo;
+
+    @Test
+    public void testQuickHello() throws Exception {
+        Response response = service.getQuickHello("test");
+        assertEquals("message = Hello test!", response.getEntity().toString());
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceIntTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceIntTest.java
new file mode 100644
index 0000000..a187369
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceIntTest.java
@@ -0,0 +1,221 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.service;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.when;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.onap.ccsdk.apps.ms.neng.core.exceptions.NengException;
+import org.onap.ccsdk.apps.ms.neng.core.persistence.NamePersister;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.NameGenRequest;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.NameGenResponse;
+import org.onap.ccsdk.apps.ms.neng.core.service.rs.RestServiceImpl;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.GeneratedName;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.PolicyDetails;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.PolicyDetailsRepository;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.ServiceParameterRepository;
+import org.onap.ccsdk.apps.ms.neng.service.extinf.impl.AaiServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
+import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager;
+import org.springframework.boot.test.mock.mockito.SpyBean;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.RequestEntity;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@DataJpaTest
+@ActiveProfiles("test")
+public class SpringServiceIntTest {
+    @Autowired
+    TestEntityManager entityManager;
+    @SpyBean
+    SpringService springService;
+    @Autowired
+    NamePersister namePersister;
+    @Autowired
+    @Qualifier("policyMgrRestTempBuilder")
+    RestTemplateBuilder policyMgrRestTempBuilder;
+    @Mock
+    RestTemplate restTemplate;
+    @Autowired
+    PolicyDetailsRepository policyDetailsRepo;
+    @Autowired
+    ServiceParameterRepository serviceParamRepo;
+    @Autowired
+    AaiServiceImpl aaiServiceImpl;
+    @Autowired
+    RestServiceImpl restServiceImpl;
+
+    @Before
+    public void setup() {
+        doReturn(restTemplate).when(policyMgrRestTempBuilder).build();
+    }
+
+    @Test
+    public void testObjects() {
+        assertNotNull(entityManager);
+        assertNotNull(namePersister);
+        assertNotNull(springService);
+    }
+
+    @Test
+    public void testNamePersiser() throws Exception {
+        GeneratedName name = new GeneratedName();
+        name.setName("abcd6ytx");
+        name.setPrefix("dlpv");
+        name.setSuffix("ytx");
+        name.setSequenceNumber(006L);
+        name.setElementType("VNF");
+        name.setGeneratedNameId(1000);
+        name.setExternalId("EXT-11");
+
+        namePersister.persist(name);
+        name = namePersister.findBy("VNF", "abcd6ytx", null);
+        assertNotNull(name);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGenName_1() throws Exception {
+        ResponseEntity<Object> resp = new ResponseEntity<Object>(
+                        getConfigResponse("JQINSRIOV.Config_MS_SriovBigJson.1.xml"), HttpStatus.OK);
+        when(restTemplate.exchange(Matchers.any(RequestEntity.class), Matchers.any(Class.class))).thenReturn(resp);
+        when(aaiServiceImpl.validate(Matchers.anyString(), Matchers.anyString())).thenReturn(true);
+        NameGenRequest request = nameGenRequest_1();
+        NameGenResponse genresp = springService.genNetworkElementName(request);
+        assertTrue("vnf-name".equals(genresp.getElements().get(0).get("resource-name")));
+    }
+
+    NameGenRequest nameGenRequest_1() {
+        Map<String, String> vnfMap = new HashMap<>();
+        vnfMap.put("external-key", "VQA-UN8");
+        vnfMap.put("policy-instance-name", "JQINSRIOV.Config_MS_SriovBigJson.1.xml");
+        vnfMap.put("complex", "vnfunfc");
+        vnfMap.put("NF_NAMING_CODE", "xyFg12");
+        vnfMap.put("resource-name", "vnf-name");
+        vnfMap.put("naming-type", "VNF");
+        vnfMap.put("nf-role", "vPE");
+
+        List<Map<String, String>> elements = new ArrayList<>();
+        elements.add(vnfMap);
+        NameGenRequest request = new NameGenRequest();
+        request.setElements(elements);
+
+        return request;
+    }
+
+    NameGenRequest nameGenRequestRelease() {
+        NameGenRequest request = new NameGenRequest();
+        Map<String, String> vnfMap = new HashMap<>();
+        vnfMap.put("external-key", "VQA-UN8");
+        List<Map<String, String>> elements = new ArrayList<>();
+        elements.add(vnfMap);
+        request.setElements(elements);
+
+        return request;
+    }
+
+    Object getConfigResponse(String policyName) throws Exception {
+        ObjectMapper objectmapper = new ObjectMapper();
+        objectmapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
+        PolicyDetails policyDetails = policyDetailsRepo.findPolicyResponseByName(policyName);
+        List<Map<Object, Object>> respObj = objectmapper.readValue(policyDetails.getPolicyResponse(),
+                        new TypeReference<List<Map<Object, Object>>>() {});
+        return respObj;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRestGenerateNetworkElementName() throws Exception {
+        NameGenRequest request = nameGenRequest_1();
+        ResponseEntity<Object> resp = new ResponseEntity<Object>(
+                        getConfigResponse("JQINSRIOV.Config_MS_SriovBigJson.1.xml"), HttpStatus.OK);
+        when(restTemplate.exchange(Matchers.any(RequestEntity.class), Matchers.any(Class.class))).thenReturn(resp);
+        when(aaiServiceImpl.validate(Matchers.anyString(), Matchers.anyString())).thenReturn(true);
+        restServiceImpl.generateNetworkElementName(request);
+    }
+
+    @Test
+    public void testRestGenerateNetworkElementName_exp() throws Exception {
+        NameGenRequest request = nameGenRequest_1();
+        doThrow(new NengException("")).when(springService).genNetworkElementName(request);
+        restServiceImpl.generateNetworkElementName(request);
+    }
+
+    @Test
+    public void testRestReleaseNetworkElementName() throws Exception {
+        NameGenRequest request = nameGenRequestRelease();
+        restServiceImpl.releaseNetworkElementName(request);
+    }
+
+    @Test
+    public void testRestReleaseNetworkElementName_exp() throws Exception {
+        NameGenRequest request = nameGenRequestRelease();
+        doThrow(new NengException("")).when(springService).releaseNetworkElementName(request);
+        restServiceImpl.releaseNetworkElementName(request);
+    }
+
+    @Test
+    public void testRestGetPolicyResponse() throws Exception {
+        List<Map<String, Object>> policyResponse =
+                        restServiceImpl.getPolicyResponse("JQINSRIOV.Config_MS_SriovBigJson.1.xml");
+        assertNotNull(policyResponse);
+    }
+
+    @Test
+    public void testRestAddPolicyToDb() throws Exception {
+        Map<String, Object> policy = new HashMap<>();
+        policy.put("policyName", "policyname");
+        policy.put("policyValue", "policyname");
+        restServiceImpl.addPolicyToDb(policy);
+    }
+
+    @Test
+    public void testRestAddPolicyToDB_exp() throws Exception {
+        Map<String, Object> policy = new HashMap<>();
+        policy.put("policyName", "policyname");
+        policy.put("policyValue", "policyname");
+
+        doThrow(new NengException("")).when(springService).addPolicy(policy);
+        restServiceImpl.addPolicyToDb(policy);
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java
new file mode 100644
index 0000000..303692c
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.NameGenRequest;
+import org.onap.ccsdk.apps.ms.neng.core.validator.ExternalKeyValidator;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.GeneratedName;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.PolicyDetails;
+import org.onap.ccsdk.apps.ms.neng.persistence.entity.ServiceParameter;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.GeneratedNameRespository;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.PolicyDetailsRepository;
+import org.onap.ccsdk.apps.ms.neng.persistence.repository.ServiceParameterRepository;
+
+@RunWith(MockitoJUnitRunner.class)
+public class SpringServiceTest {
+
+    @Mock
+    ExternalKeyValidator externalKeyValidator;
+    @Mock
+    ServiceParameter param;
+    @Mock
+    ServiceParameterRepository serviceParamRepo;
+    @Mock
+    PolicyDetails policyDetails;
+    @Mock
+    PolicyDetailsRepository policyDetailsRepository;
+    @Mock
+    GeneratedNameRespository generatedNameRepository;
+
+    @InjectMocks
+    SpringServiceImpl springserviceImpl;
+
+    Map<String, String> req = new HashMap<>();
+    List<Map<String, String>> rsp = new ArrayList<>();
+    NameGenRequest request = new NameGenRequest();
+
+    {
+        req.put("external-key", "Xyx-zzk");
+        req.put("policy-instance-name", "testDbPolicy66");
+        req.put("COMPLEX", "TRLAKDG");
+        req.put("NFC-NAMING-CODE", "ESP");
+        req.put("CLOUD_REGION_ID", "SSR");
+        req.put("NF_CODE", "X1234");
+        req.put("resource-name", "vm-name");
+        req.put("naming-type", "VM");
+        req.put("nf-role", "vPE");
+        rsp.add(req);
+        request.setElements(rsp);
+    }
+
+    @Test(expected = Exception.class)
+    public void genNetworkElementNameTest() throws Exception {
+        Mockito.when(externalKeyValidator.isPresent(req.get("external-key"))).thenReturn(false);
+        Mockito.when(serviceParamRepo.findByName("use_db_policy")).thenReturn(param);
+        springserviceImpl.genNetworkElementName(request);
+
+    }
+
+    @Test
+    public void getPolicyDetailsTest() {
+        Mockito.when(policyDetailsRepository.findPolicyResponseByName("testDbPolicy66")).thenReturn(policyDetails);
+        org.junit.Assert.assertNotNull(springserviceImpl.getPolicyDetails("testDbPolicy66"));
+    }
+
+    @Test
+    public void addPolicy() throws Exception {
+        springserviceImpl.addPolicy(req);
+    }
+
+    @Test
+    public void releaseNetworkElementNameTest() throws Exception {
+        GeneratedName gn = new GeneratedName();
+        List<GeneratedName> generatedNameList = new ArrayList<>();
+        generatedNameList.add(gn);
+
+        Mockito.when(generatedNameRepository.findByExternalId(req.get("external-key"))).thenReturn(generatedNameList);
+        Assert.assertNotNull(springserviceImpl.releaseNetworkElementName(request));
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/TestApplicationConfig.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/TestApplicationConfig.java
new file mode 100644
index 0000000..5e30bac
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/TestApplicationConfig.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.core.service;
+
+import static org.mockito.Mockito.spy;
+
+import org.mockito.Mockito;
+import org.onap.ccsdk.apps.ms.neng.core.rs.interceptors.PolicyManagerAuthorizationInterceptor;
+import org.onap.ccsdk.apps.ms.neng.service.extinf.impl.AaiServiceImpl;
+import org.springframework.boot.SpringBootConfiguration;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootConfiguration
+@ActiveProfiles("test")
+@ComponentScan(basePackages = {"org.onap.ccsdk.apps.ms.neng"})
+@EnableJpaRepositories(basePackages = "org.onap.ccsdk.apps.ms.neng.persistence.repository")
+@EntityScan(basePackages = {"org.onap.ccsdk.apps.ms.neng.persistence.entity"})
+@EnableTransactionManagement
+public class TestApplicationConfig {
+
+    @Bean
+    @Primary
+    public RestTemplateBuilder policyMgrRestTempBuilder(PolicyManagerAuthorizationInterceptor auth) {
+        RestTemplateBuilder restTemplateBuiler = new RestTemplateBuilder();
+        return spy(restTemplateBuiler.additionalInterceptors(auth));
+    }
+
+    @Bean
+    @Primary
+    AaiServiceImpl aaiServiceImpl() {
+        return Mockito.mock(AaiServiceImpl.class);
+    }
+}
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImplTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImplTest.java
new file mode 100644
index 0000000..17dddd4
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImplTest.java
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.ccsdk.apps.ms.neng.service.extinf.impl;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.when;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.core.exceptions.NengException;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigRequest;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigResponse;
+import org.onap.ccsdk.apps.ms.neng.core.rs.interceptors.PolicyManagerAuthorizationInterceptor;
+import org.onap.ccsdk.apps.ms.neng.extinf.props.PolicyManagerProps;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.RequestEntity;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(MockitoJUnitRunner.class)
+public class PolicyFinderServiceImplTest {
+    @InjectMocks
+    @Spy
+    PolicyFinderServiceImpl policyFinder;
+    @Spy
+    PolicyManagerProps policManProps;
+    @Mock
+    RestTemplateBuilder policyMgrRestTempBuilder;
+    @Mock
+    PolicyManagerAuthorizationInterceptor authInt;
+    @Mock
+    RestTemplate restTemplate;
+
+    @Test
+    public void testConfig() throws Exception {
+        doReturn(new GetConfigResponse()).when(policyFinder).makeOutboundCall(Matchers.any(), Matchers.any());
+        assertNotNull(policyFinder.getConfig("policy"));
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testmakeOutboundCall() throws Exception {
+        Map<String, Object> configMap = buildPolicyResponse();
+        Object resp = Arrays.asList(new Object[] {configMap});
+        ResponseEntity<Object> respEn = new ResponseEntity<>(resp, HttpStatus.OK);
+        when(restTemplate.exchange(Matchers.any(RequestEntity.class), Matchers.any(Class.class))).thenReturn(respEn);
+
+        policManProps.setUrl("http://policyManager.onap.org");
+
+        GetConfigRequest request = new GetConfigRequest();
+        request.setPolicyName("policy");
+        GetConfigResponse configResp = policyFinder.makeOutboundCall(request, GetConfigResponse.class);
+        assertNotNull(configResp);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test(expected = NengException.class)
+    public void testmakeOutboundCall_500() throws Exception {
+        Map<String, Object> configMap = buildPolicyResponse();
+        Object resp = Arrays.asList(new Object[] {configMap});
+        ResponseEntity<Object> respEn = new ResponseEntity<>(resp, HttpStatus.INTERNAL_SERVER_ERROR);
+        when(restTemplate.exchange(Matchers.any(RequestEntity.class), Matchers.any(Class.class))).thenReturn(respEn);
+
+        policManProps.setUrl("http://policyManager.onap.org");
+
+        GetConfigRequest request = new GetConfigRequest();
+        request.setPolicyName("policy");
+        policyFinder.makeOutboundCall(request, GetConfigResponse.class);
+    }
+
+    @Test
+    public void testGetRestTemplate() throws Exception {
+        PolicyFinderServiceImpl service = new PolicyFinderServiceImpl();
+        RestTemplateBuilder policyRestTemplateBuilder = new RestTemplateBuilder();
+        service.setPolicyMgrRestTempBuilder(policyRestTemplateBuilder);
+        service.setAuthInt(new PolicyManagerAuthorizationInterceptor());
+
+        assertNotNull(service.getPolicyMgrRestTempBuilder());
+        assertNotNull(service.getAuthInt());
+        assertNotNull(service.getRestTemplate());
+    }
+
+    @Test
+    public void testTransformConfigObject() throws Exception {
+        String config = "{\"riskLevel\":\"4\",\"riskType\":\"test\","
+                        + "\"policyName\":\"1806SriovBigJson\",\"service\":\"SDNC-GenerateName\","
+                        + "\"guard\":\"False\",\"description\":\"1806SriovBigJson\","
+                        + "\"templateVersion\":\"1607\",\"priority\":\"4\",\"version\":\"pannny_nnnn\","
+                        + "\"content\":{\"policy-instance-name\":\"1806NameGenerationPolicyForSRIOV\","
+                        + "\"naming-models\":[{\"naming-properties\":[{\"property-operation\":\"substr(5)\","
+                        + "\"property-name\":\"COMPLEX\"},{\"property-name\":\"SEQUENCE\","
+                        + "\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\","
+                        + "\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\","
+                        + "\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NF_NAMING_CODE\"}],"
+                        + "\"naming-type\":\"VNF\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"COMPLEX|SEQUENCE|NF_NAMING_CODE\"},"
+                        + "{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},"
+                        + "{\"property-name\":\"SEQUENCE\",\"increment-sequence\":"
+                        + "{\"max\":\"999\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\","
+                        + "\"increment\":\"1\",\"sequence-type\":\"numeric\"}},"
+                        + "{\"property-operation\":\"substr(-3)\",\"property-name\":\"NFC_NAMING_CODE\"}],"
+                        + "\"naming-type\":\"VM\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"VNF_NAME|SEQUENCE|NFC_NAMING_CODE\"},"
+                        + "{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},"
+                        + "{\"property-value\":\"-\",\"property-name\":\"DELIMITER\"},"
+                        + "{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},"
+                        + "{\"property-name\":\"SEQUENCE\",\"increment-sequence\":"
+                        + "{\"max\":\"99\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"2\","
+                        + "\"increment\":\"1\",\"sequence-type\":\"numeric\"}}],"
+                        + "\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER"
+                        + "|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},"
+                        + "{\"naming-properties\":[{\"property-name\":\"VF-MODULE_NAME\"},"
+                        + "{\"property-value\":\"-\",\"property-name\":\"DELIMITER\"},"
+                        + "{\"property-value\":\"volumegroup\",\"property-name\":\"CONSTANT\"}],"
+                        + "\"naming-type\":\"VOLUME_GROUP\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"VF-MODULE_NAME|DELIMITER|CONSTANT\"},"
+                        + "{\"naming-properties\":[{\"property-name\":\"VOLUME_GROUP_NAME\"},"
+                        + "{\"property-value\":\"-\",\"property-name\":\"DELIMITER\"},"
+                        + "{\"property-value\":\"volume\",\"property-name\":\"CONSTANT\"},"
+                        + "{\"property-name\":\"SEQUENCE\",\"increment-sequence\":"
+                        + "{\"max\":\"99\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\","
+                        + "\"length\":\"2\",\"increment\":\"1\",\"sequence-type\":\"numeric\"}}],"
+                        + "\"naming-type\":\"VOLUME\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"VOLUME_GROUP_NAME|DELIMITER|CONSTANT|DELIMITER|SEQUENCE\"},"
+                        + "{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},"
+                        + "{\"property-value\":\"-\",\"property-name\":\"DELIMITER\"},"
+                        + "{\"property-value\":\"affinity\",\"property-name\":\"CONSTANT\"}],"
+                        + "\"naming-type\":\"AFFINITY\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},"
+                        + "{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},"
+                        + "{\"property-value\":\"-\",\"property-name\":\"DELIMITER\"},"
+                        + "{\"property-value\":\"INT\",\"property-name\":\"CONSTANT\"},"
+                        + "{\"property-name\":\"SEQUENCE\",\"increment-sequence\":"
+                        + "{\"max\":\"99\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\","
+                        + "\"length\":\"2\",\"increment\":\"1\",\"sequence-type\":\"numeric\"}}],"
+                        + "\"naming-type\":\"INTERNAL_NETWORK\",\"nfRole\":\"vPE\","
+                        + "\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT|SEQUENCE\"}]}}";
+        Map<Object, Object> configMap = new HashMap<>();
+        configMap.put("config", config);
+        ObjectMapper objectmapper = new ObjectMapper();
+        List<Map<Object, Object>> respList = new ArrayList<>();
+        respList.add(configMap);
+        policyFinder.transformConfigObject(objectmapper, respList);
+        assertNotNull(respList.get(0).get("config"));
+    }
+
+    Map<String, Object> buildPolicyResponse() {
+        Map<String, Object> policyDataMap = new HashMap<>();
+        policyDataMap.put("policy-instance-name", "SDNC_Policy.Config_MS_VNFCNamingPolicy");
+        Map<String, Object> namingModelMap = new HashMap<>();
+        namingModelMap.put("nf-role", "vPE");
+        namingModelMap.put("naming-type", "VNF");
+        namingModelMap.put("naming-recipe", "COMPLEX|NF-NAMING-CODE|Field2|Field3|Field4");
+        Map<String, Object> namingPropertyMap = new HashMap<>();
+        Map<String, Object> propertyMap1 = new HashMap<>();
+        propertyMap1.put("property-name", "COMPLEX");
+        Map<String, Object> propertyMap2 = new HashMap<>();
+        propertyMap2.put("property-name", "NF-NAMING-CODE");
+        namingPropertyMap.put("", Arrays.asList(new Object[] {propertyMap1, propertyMap2}));
+        namingModelMap.put("naming-properties", namingPropertyMap);
+        policyDataMap.put("naming-models", Arrays.asList(new Object[] {namingModelMap}));
+        Map<String, Object> configMap = new HashMap<>();
+        Map<String, Object> contentMap = new HashMap<>();
+        contentMap.put("content", policyDataMap);
+        configMap.put("config", contentMap);
+        return configMap;
+    }
+}
diff --git a/ms/neng/src/test/resources/application-test.properties b/ms/neng/src/test/resources/application-test.properties
new file mode 100644
index 0000000..ca8ac12
--- /dev/null
+++ b/ms/neng/src/test/resources/application-test.properties
@@ -0,0 +1,38 @@
+info.build.artifact=@project.artifactId@
+info.build.name=@project.name@
+info.build.description=@project.description@
+info.build.version=@project.version@
+
+spring.jersey.type=filter
+
+logging.level.root=info
+logging.level.org.glassfish=info
+logging.level.org.glassfish.jersey=info
+
+spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
+
+logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp}  responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex
+
+liquibase.changeLog=classpath:/h2db/changelog/h2db.changelog-master.xml
+logging.level.liquibase: DEBUG
+
+spring.jersey.type=filter
+spring.mvc.urls=swagger,docs,prometheus,auditevents,info,heapdump,autoconfig,beans,loggers,dump,env,trace,health,configprops,mappings
+
+server.contextPath=/web
+
+spring.datasource.driver-class-name=org.h2.Driver
+spring.datasource.username=sa
+spring.datasource.password=sa
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.show-sql=true
+spring.datasource.url=jdbc:h2:mem:tests;DB_CLOSE_DELAY=-1;
+
+datasource.db.driver-class-name=org.h2.Driver
+datasource.db.url=jdbc:h2:mem:tests;DB_CLOSE_DELAY=-1;
+datasource.db.username=sa
+datasource.db.password=sa
+jpa.hibernate.ddl-auto=none
+jpa.show-sql=true
+
+entitymanager.packagesToScan=org.onap.ccsdk.apps.ms.neng.persistence.entity
diff --git a/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml b/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml
new file mode 100644
index 0000000..496a2e9
--- /dev/null
+++ b/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ 
+<databaseChangeLog
+        xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
+         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
+ 
+    <include file="db/changelog/scripts/rel_18_10/create_base_tables.sql" />
+    <include file="db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql" />
+    <include file="db/changelog/scripts/rel_18_10/02_create_indexes_ddl.sql" />
+    <include file="db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql" />
+    
+    <include file="h2db/changelog/scripts/50_load_sim_data_dml.sql" />
+    <include file="h2db/changelog/scripts/51_ref_data_upd_dml.sql" />
+</databaseChangeLog>
\ No newline at end of file
diff --git a/ms/neng/src/test/resources/h2db/changelog/scripts/50_load_sim_data_dml.sql b/ms/neng/src/test/resources/h2db/changelog/scripts/50_load_sim_data_dml.sql
new file mode 100644
index 0000000..5c750bd
--- /dev/null
+++ b/ms/neng/src/test/resources/h2db/changelog/scripts/50_load_sim_data_dml.sql
@@ -0,0 +1,23 @@
+--liquibase formatted sql
+--changeset policy_man_sim:18_06.table_load.sql
+
+insert into policy_man_sim(policy_name, policy_response) values ('JQINSRIOV.Config_MS_SriovBigJson.1.xml', '[
+  {
+    "policyConfigMessage": "Config Retrieved! ",
+    "policyConfigStatus": "CONFIG_RETRIEVED",
+    "type": "JSON",
+    "config": {"riskLevel":"4","riskType":"test","policyName":"SriovBigJson","service":"SDNC-GenerateName","guard":"False","description":"SriovBigJson","templateVersion":"1607","priority":"4","version":"pannny_nnnn","content":{"policy-instance-name":"NameGenerationPolicyForSRIOV","naming-models":[{"naming-properties":[{"property-operation":"substr(5)","property-name":"COMPLEX"},{"property-name":"SEQUENCE","increment-sequence":{"max":"zzz","scope":"ENTIRETY","start-value":"001","length":"3","increment":"1","sequence-type":"alpha-numeric"}},{"property-name":"NF_NAMING_CODE"}],"naming-type":"VNF","nfRole":"vPE","naming-recipe":"COMPLEX|SEQUENCE|NF_NAMING_CODE"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-name":"SEQUENCE","increment-sequence":{"max":"999","scope":"ENTIRETY","start-value":"001","length":"3","increment":"1","sequence-type":"numeric"}},{"property-operation":"substr(-3)","property-name":"NFC_NAMING_CODE"}],"naming-type":"VM","nfRole":"vPE","naming-recipe":"VNF_NAME|SEQUENCE|NFC_NAMING_CODE"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-name":"VF_MODULE_LABEL"},{"property-name":"VF_MODULE_TYPE"},{"property-name":"SEQUENCE","increment-sequence":{"max":"99","scope":"PRECEEDING","start-value":"01","length":"2","increment":"1","sequence-type":"numeric"}}],"naming-type":"VF-MODULE","nfRole":"vPE","naming-recipe":"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE"},{"naming-properties":[{"property-name":"VF-MODULE_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"volumegroup","property-name":"CONSTANT"}],"naming-type":"VOLUME_GROUP","nfRole":"vPE","naming-recipe":"VF-MODULE_NAME|DELIMITER|CONSTANT"},{"naming-properties":[{"property-name":"VOLUME_GROUP_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"volume","property-name":"CONSTANT"},{"property-name":"SEQUENCE","increment-sequence":{"max":"99","scope":"PRECEEDING","start-value":"01","length":"2","increment":"1","sequence-type":"numeric"}}],"naming-type":"VOLUME","nfRole":"vPE","naming-recipe":"VOLUME_GROUP_NAME|DELIMITER|CONSTANT|DELIMITER|SEQUENCE"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"affinity","property-name":"CONSTANT"}],"naming-type":"AFFINITY","nfRole":"vPE","naming-recipe":"VNF_NAME|DELIMITER|CONSTANT"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"INT","property-name":"CONSTANT"},{"property-name":"SEQUENCE","increment-sequence":{"max":"99","scope":"PRECEEDING","start-value":"01","length":"2","increment":"1","sequence-type":"numeric"}}],"naming-type":"INTERNAL_NETWORK","nfRole":"vPE","naming-recipe":"VNF_NAME|DELIMITER|CONSTANT|SEQUENCE"}]}},
+    "policyName": "JQINSRIOV.Config_MS_SriovBigJson.1.xml",
+    "policyType": "MicroService",
+    "policyVersion": "1",
+    "matchingConditions": {
+      "ECOMPName": "SDNC",
+      "ONAPName": "SDNC",
+      "service": "SDNC-GenerateName"
+    },
+    "responseAttributes": {},
+    "property": null
+  }
+]');
+
+commit;
\ No newline at end of file
diff --git a/ms/neng/src/test/resources/h2db/changelog/scripts/51_ref_data_upd_dml.sql b/ms/neng/src/test/resources/h2db/changelog/scripts/51_ref_data_upd_dml.sql
new file mode 100644
index 0000000..2114a62
--- /dev/null
+++ b/ms/neng/src/test/resources/h2db/changelog/scripts/51_ref_data_upd_dml.sql
@@ -0,0 +1,5 @@
+--liquibase formatted sql
+--changeset ref_data_update:18_10.ref_data_update.sql
+
+DELETE FROM SERVICE_PARAMETER where NAME='use_db_policy';
+INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('use_db_policy','Y','Initial');
