Update mountpoint-registrar

Include cleanup for test code

Issue-ID: SDNC-1030
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I2ec89f4d74817b61aee888127bc61de6dd335cef
diff --git a/sdnr/wt/mountpoint-registrar/feature/pom.xml b/sdnr/wt/mountpoint-registrar/feature/pom.xml
index 5cefa76..51af84f 100644
--- a/sdnr/wt/mountpoint-registrar/feature/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/feature/pom.xml
@@ -28,7 +28,7 @@
     <groupId>org.onap.ccsdk.parent</groupId>
     <artifactId>single-feature-parent</artifactId>
     <version>1.5.2-SNAPSHOT</version>
-    <relativePath/>
+    <relativePath />
   </parent>
 
   <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
@@ -36,7 +36,7 @@
   <version>0.7.1-SNAPSHOT</version>
   <packaging>feature</packaging>
 
-  <name>ccsdk-features-sdnr-wt :: ${project.artifactId} :: feature</name>
+  <name>ccsdk-features :: ${project.artifactId} :: feature</name>
 
   <dependencyManagement>
     <dependencies>
diff --git a/sdnr/wt/mountpoint-registrar/installer/pom.xml b/sdnr/wt/mountpoint-registrar/installer/pom.xml
index 1528893..96dc188 100755
--- a/sdnr/wt/mountpoint-registrar/installer/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/installer/pom.xml
@@ -36,7 +36,7 @@
   <version>0.7.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
-  <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+  <name>ccsdk-features :: ${project.artifactId}</name>
 
   <properties>
     <application.name>sdnr-wt-mountpoint-registrar</application.name>
diff --git a/sdnr/wt/mountpoint-registrar/model/pom.xml b/sdnr/wt/mountpoint-registrar/model/pom.xml
index 55d9595..53c0fe9 100644
--- a/sdnr/wt/mountpoint-registrar/model/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/model/pom.xml
@@ -36,7 +36,7 @@
   <version>0.7.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
-  <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+  <name>ccsdk-features :: ${project.artifactId}</name>
   <licenses>
     <license>
       <name>Apache License, Version 2.0</name>
diff --git a/sdnr/wt/mountpoint-registrar/pom.xml b/sdnr/wt/mountpoint-registrar/pom.xml
index cc51656..27a6674 100755
--- a/sdnr/wt/mountpoint-registrar/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/pom.xml
@@ -36,7 +36,7 @@
     <version>0.7.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+    <name>ccsdk-features :: ${project.artifactId}</name>
 
     <modules>
         <module>model</module>
diff --git a/sdnr/wt/mountpoint-registrar/provider/pom.xml b/sdnr/wt/mountpoint-registrar/provider/pom.xml
index 554ce3a..39f9eb5 100644
--- a/sdnr/wt/mountpoint-registrar/provider/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/provider/pom.xml
@@ -17,7 +17,7 @@
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
         <version>1.5.2-SNAPSHOT</version>
-        <relativePath/>
+        <relativePath />
     </parent>
 
     <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
@@ -25,7 +25,7 @@
     <version>0.7.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
-    <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+    <name>ccsdk-features :: ${project.artifactId}</name>
     <licenses>
         <license>
             <name>Apache License, Version 2.0</name>
@@ -38,7 +38,6 @@
         <maven.javadoc.skip>true</maven.javadoc.skip>
         <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
         <buildtime>${maven.build.timestamp} UTC</buildtime>
-        <elasticsearch.version>6.4.3</elasticsearch.version>
     </properties>
 
     <dependencies>
@@ -107,12 +106,6 @@
             <version>${project.version}</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
-            <artifactId>sdnr-wt-data-provider-database</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
index 2bc4149..29da7ad 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
@@ -24,6 +24,7 @@
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 
+import org.junit.After;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.PNFRegistrationConfig;
@@ -70,5 +71,15 @@
 		}
 
 	}
+	
+	@After
+	public void cleanUp() {
+		File file = new File("test.properties");
+		if (file.exists()) {
+			System.out.println("File exists, Deleting it");
+			file.delete();
+		}
+		
+	}
 
 }
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
index 9564773..aefeddb 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
@@ -107,18 +107,18 @@
 	Map<String, Configuration> configMap = new HashMap<String, Configuration>();
 	DMaaPVESMsgConsumerMain dmaapMain;
 
-//	@Before
+	//	@Before
 	public void preTest1() {
 		try {
-		Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL);
-		ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
+			Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL);
+			ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
 
-		generalConfig = new GeneralConfig(configFileRepresentation);
-		PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
-		FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
+			generalConfig = new GeneralConfig(configFileRepresentation);
+			PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
+			FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
 
-		configMap.put("pnfRegistration", pnfRegConfig);
-		configMap.put("fault", faultConfig);
+			configMap.put("pnfRegistration", pnfRegConfig);
+			configMap.put("fault", faultConfig);
 		} catch (Exception e) {
 			System.out.println("Failed in preTest execution "+e.getMessage());
 		}
@@ -126,15 +126,15 @@
 
 	public void preTest2() {
 		try {
-		Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL_INVALID);
-		ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
+			Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL_INVALID);
+			ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
 
-		generalConfig = new GeneralConfig(configFileRepresentation);
-		PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
-		FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
+			generalConfig = new GeneralConfig(configFileRepresentation);
+			PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
+			FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
 
-		configMap.put("pnfRegistration", pnfRegConfig);
-		configMap.put("fault", faultConfig);
+			configMap.put("pnfRegistration", pnfRegConfig);
+			configMap.put("fault", faultConfig);
 		} catch (Exception e) {
 			System.out.println("Failed in preTest execution "+e.getMessage());
 		}
@@ -146,7 +146,7 @@
 		assertNotNull(configMap);
 		dmaapMain = new DMaaPVESMsgConsumerMain(configMap);
 	}
-	
+
 	@Test
 	public void testDMaaPVESMsgConsumerMainMapOfStringConfiguration1() {
 		preTest2();
@@ -156,11 +156,17 @@
 
 	@After
 	public void postTest() {
+		File file = new File("test.properties");
+		if (file.exists()) {
+			System.out.println("File exists, Deleting it");
+			file.delete();
+		}
 		List<DMaaPVESMsgConsumer> consumers = DMaaPVESMsgConsumerMain.getConsumers();
 		for (DMaaPVESMsgConsumer consumer : consumers) {
 			// stop all consumers
 			consumer.stopConsumer();
 		}
 	}
-
 }
+
+
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
index cbdb24a..e8573e4 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
@@ -24,6 +24,7 @@
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 
+import org.junit.After;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.FaultConfig;
@@ -71,5 +72,15 @@
 			// TODO Auto-generated catch block
 		}
 	}
+	
+	@After
+	public void cleanUp() {
+		File file = new File("test.properties");
+		if (file.exists()) {
+			System.out.println("File exists, Deleting it");
+			file.delete();
+		}
+		
+	}
 
 }
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
index 5c9fbe3..9790a9c 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
@@ -18,16 +18,16 @@
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import java.util.Optional;
 import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.yangtools.YangToolsMapper;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SeverityType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.PushFaultNotificationInputBuilder;
 
 public class TestMapping {
 
-    private final YangToolsMapper mapper = new YangToolsMapper();
+    private final ObjectMapper mapper = new ObjectMapper();
 
 
     private static Optional<SeverityType> getSeverity(String faultSeverity) {
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
index 014a96f..b048c20 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
@@ -123,7 +123,7 @@
             Thread.sleep(millis);
         } catch (InterruptedException e) {
             LOG.warn(e.getMessage());
-            Thread.interrupted();
+            Thread.currentThread().interrupt();
         }
     }