diff --git a/datarouter-node/pom.xml b/datarouter-node/pom.xml
index af605b0..d9650c2 100755
--- a/datarouter-node/pom.xml
+++ b/datarouter-node/pom.xml
@@ -234,7 +234,7 @@
                     <archive>
                         <manifest>
                             <addClasspath>true</addClasspath>
-                            <mainClass>org.onap.dmaap.datarouter.node.NodeMain</mainClass>
+                            <mainClass>org.onap.dmaap.datarouter.node.NodeRunner</mainClass>
                         </manifest>
                     </archive>
                 </configuration>
@@ -355,7 +355,7 @@
                 <artifactId>jacoco-maven-plugin</artifactId>
                 <configuration>
                     <excludes>
-                        <exclude>src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java</exclude>
+                        <exclude>src/main/java/org/onap/dmaap/datarouter/node/NodeRunner.java</exclude>
                     </excludes>
                 </configuration>
             </plugin>
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
index 83d5186..5931856 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
@@ -66,7 +66,6 @@
         this.config = config;
         Runnable cmon = this::checkconfig;
         config.registerConfigTask(cmon);
-        checkconfig();
     }
 
     /**
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryQueue.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryQueue.java
index 4d336b7..d447bcc 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryQueue.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryQueue.java
@@ -224,16 +224,13 @@
                 todoindex = 0;
                 todoList = new ArrayList<>();
                 String[] files = dir.list();
-                Arrays.sort(files);
-                scanForNextTask(files);
+                if (files != null) {
+                    Arrays.sort(files);
+                    scanForNextTask(files);
+                }
                 retry = new HashMap<>();
             }
-            DeliveryTask dt = getDeliveryTask(mindate);
-            if (dt != null) {
-                return dt;
-            }
-            return null;
-
+            return getDeliveryTask(mindate);
         }
     }
 
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtils.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtils.java
index 542dfd0..0c31db9 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtils.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtils.java
@@ -45,7 +45,7 @@
     String getDecryptedPass(String password) {
         String decryptedPass = "";
         try {
-            decryptedPass = getPropAccess().decrypt(getPropAccess().getProperty(password), false);
+            decryptedPass = propAccess.decrypt(propAccess.getProperty(password), false);
         } catch (IOException e) {
             eelfLogger.error("Failed to decrypt " + password + " : " + e.getMessage(), e);
         }
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
index aeddc72..298e185 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
@@ -53,7 +53,6 @@
  */
 public class NodeConfigManager implements DeliveryQueueHelper {
 
-    private static final String CHANGE_ME = "changeme";
     private static final String NODE_CONFIG_MANAGER = "NodeConfigManager";
     private static EELFLogger eelfLogger = EELFManager.getInstance().getLogger(NodeConfigManager.class);
     private static NodeConfigManager base = new NodeConfigManager();
@@ -103,7 +102,6 @@
     private String aafType;
     private String aafInstance;
     private String aafAction;
-    private String aafURL;
     private boolean cadiEnabled;
     private NodeAafPropsUtils nodeAafPropsUtils;
 
@@ -141,7 +139,6 @@
         aafInstance = drNodeProperties.getProperty("AAFInstance", "legacy");
         aafAction = drNodeProperties.getProperty("AAFAction", "publish");
         cadiEnabled = Boolean.parseBoolean(drNodeProperties.getProperty("CadiEnabled", "false"));
-        aafURL = nodeAafPropsUtils.getPropAccess().getProperty("aaf_locate_url", "https://aaf-locate:8095");
         /*
          * END - AAF changes: TDP EPIC US# 307413
          * Pull AAF settings from node.properties
@@ -300,7 +297,8 @@
     private void fetchconfig() {
         try {
             eelfLogger.debug("NodeConfigMan.fetchConfig: provurl:: " + provurl);
-            Reader reader = new InputStreamReader((new URL(provurl)).openStream());
+            URL url = new URL(provurl);
+            Reader reader = new InputStreamReader(url.openStream());
             config = new NodeConfig(new ProvData(reader), myname, spooldir, port, nak);
             localconfig();
             configtasks.startRun();
@@ -329,7 +327,7 @@
      * fetch the provisioning data, ignore the request.  If the data has been fetched very recently (default 10
      * seconds), wait a while before fetching again.
      */
-    public synchronized void gofetch(String remoteAddr) {
+    synchronized void gofetch(String remoteAddr) {
         if (provcheck.isReachable(remoteAddr)) {
             eelfLogger.debug("NODE0307 Received configuration fetch request from provisioning server " + remoteAddr);
             pfetcher.request();
@@ -341,15 +339,15 @@
     /**
      * Am I configured.
      */
-    public boolean isConfigured() {
-        return (config != null);
+    boolean isConfigured() {
+        return config != null;
     }
 
     /**
      * Am I shut down.
      */
-    public boolean isShutdown() {
-        return (quiesce.exists());
+    boolean isShutdown() {
+        return quiesce.exists();
     }
 
     /**
@@ -358,8 +356,8 @@
      * @param routing Target string
      * @return array of targets
      */
-    public Target[] parseRouting(String routing) {
-        return (config.parseRouting(routing));
+    Target[] parseRouting(String routing) {
+        return config.parseRouting(routing);
     }
 
     /**
@@ -369,8 +367,8 @@
      * @param ip IP address the request came from
      * @return If the credentials and IP address are recognized, true, otherwise false.
      */
-    public boolean isAnotherNode(String credentials, String ip) {
-        return (config.isAnotherNode(credentials, ip));
+    boolean isAnotherNode(String credentials, String ip) {
+        return config.isAnotherNode(credentials, ip);
     }
 
     /**
@@ -381,8 +379,8 @@
      * @param ip The requesting IP address
      * @return True if the IP and credentials are valid for the specified feed.
      */
-    public String isPublishPermitted(String feedid, String credentials, String ip) {
-        return (config.isPublishPermitted(feedid, credentials, ip));
+    String isPublishPermitted(String feedid, String credentials, String ip) {
+        return config.isPublishPermitted(feedid, credentials, ip);
     }
 
     /**
@@ -392,8 +390,8 @@
      * @param ip The requesting IP address
      * @return True if the IP and credentials are valid for the specified feed.
      */
-    public String isPublishPermitted(String feedid, String ip) {
-        return (config.isPublishPermitted(feedid, ip));
+    String isPublishPermitted(String feedid, String ip) {
+        return config.isPublishPermitted(feedid, ip);
     }
 
     /**
@@ -402,8 +400,8 @@
      * @param subId The ID of the subscription being requested
      * @return True if the delete file is permitted for the subscriber.
      */
-    public boolean isDeletePermitted(String subId) {
-        return (config.isDeletePermitted(subId));
+    boolean isDeletePermitted(String subId) {
+        return config.isDeletePermitted(subId);
     }
 
     /**
@@ -413,8 +411,8 @@
      * @param credentials The offered credentials
      * @return Null if the credentials are invalid or the user if they are valid.
      */
-    public String getAuthUser(String feedid, String credentials) {
-        return (config.getAuthUser(feedid, credentials));
+    String getAuthUser(String feedid, String credentials) {
+        return config.getAuthUser(feedid, credentials);
     }
 
     /**
@@ -422,11 +420,11 @@
      *
      * @param feedid The ID of the feed specified
      */
-    public String getAafInstance(String feedid) {
-        return (config.getAafInstance(feedid));
+    String getAafInstance(String feedid) {
+        return config.getAafInstance(feedid);
     }
 
-    public String getAafInstance() {
+    String getAafInstance() {
         return aafInstance;
     }
 
@@ -438,8 +436,8 @@
      * @param ip The IP address of the publish endpoint
      * @return Null if the request should be accepted or the correct hostname if it should be sent to another node.
      */
-    public String getIngressNode(String feedid, String user, String ip) {
-        return (config.getIngressNode(feedid, user, ip));
+    String getIngressNode(String feedid, String user, String ip) {
+        return config.getIngressNode(feedid, user, ip);
     }
 
     /**
@@ -448,8 +446,8 @@
      * @param name The name of the parameter
      * @return The value of the parameter or null if it is not defined.
      */
-    public String getProvParam(String name) {
-        return (config.getProvParam(name));
+    private String getProvParam(String name) {
+        return config.getProvParam(name);
     }
 
     /**
@@ -459,39 +457,39 @@
      * @param defaultValue The value to use if the parameter is not defined
      * @return The value of the parameter or deflt if it is not defined.
      */
-    public String getProvParam(String name, String defaultValue) {
+    private String getProvParam(String name, String defaultValue) {
         name = config.getProvParam(name);
         if (name == null) {
             name = defaultValue;
         }
-        return (name);
+        return name;
     }
 
     /**
      * Generate a publish ID.
      */
     public String getPublishId() {
-        return (pid.next());
+        return pid.next();
     }
 
     /**
      * Get all the outbound spooling destinations. This will include both subscriptions and nodes.
      */
-    public DestInfo[] getAllDests() {
-        return (config.getAllDests());
+    DestInfo[] getAllDests() {
+        return config.getAllDests();
     }
 
     /**
      * Register a task to run whenever the configuration changes.
      */
-    public void registerConfigTask(Runnable task) {
+    void registerConfigTask(Runnable task) {
         configtasks.addTask(task);
     }
 
     /**
      * Deregister a task to run whenever the configuration changes.
      */
-    public void deregisterConfigTask(Runnable task) {
+    void deregisterConfigTask(Runnable task) {
         configtasks.removeTask(task);
     }
 
@@ -542,49 +540,49 @@
      * Get the timeout before retrying after an initial delivery failure.
      */
     public long getInitFailureTimer() {
-        return (initfailuretimer);
+        return initfailuretimer;
     }
 
     /**
      * Get the timeout before retrying after delivery and wait for file processing.
      */
     public long getWaitForFileProcessFailureTimer() {
-        return (waitForFileProcessFailureTimer);
+        return waitForFileProcessFailureTimer;
     }
 
     /**
      * Get the maximum timeout between delivery attempts.
      */
     public long getMaxFailureTimer() {
-        return (maxfailuretimer);
+        return maxfailuretimer;
     }
 
     /**
      * Get the ratio between consecutive delivery attempts.
      */
     public double getFailureBackoff() {
-        return (failurebackoff);
+        return failurebackoff;
     }
 
     /**
      * Get the expiration timer for deliveries.
      */
     public long getExpirationTimer() {
-        return (expirationtimer);
+        return expirationtimer;
     }
 
     /**
      * Get the maximum number of file delivery attempts before checking if another queue has work to be performed.
      */
     public int getFairFileLimit() {
-        return (fairfilelimit);
+        return fairfilelimit;
     }
 
     /**
      * Get the maximum amount of time spent delivering files before checking if another queue has work to be performed.
      */
     public long getFairTimeLimit() {
-        return (fairtimelimit);
+        return fairtimelimit;
     }
 
     /**
@@ -593,21 +591,21 @@
      * @param feedid The feed ID
      * @return The targets this feed should be delivered to
      */
-    public Target[] getTargets(String feedid) {
-        return (config.getTargets(feedid));
+    Target[] getTargets(String feedid) {
+        return config.getTargets(feedid);
     }
 
     /**
      * Get the spool directory for temporary files.
      */
-    public String getSpoolDir() {
-        return (spooldir + "/f");
+    String getSpoolDir() {
+        return spooldir + "/f";
     }
 
     /**
      * Get the spool directory for a subscription.
      */
-    public String getSpoolDir(String subid, String remoteaddr) {
+    String getSpoolDir(String subid, String remoteaddr) {
         if (provcheck.isFrom(remoteaddr)) {
             String sdir = config.getSpoolDir(subid);
             if (sdir != null) {
@@ -617,137 +615,150 @@
                 eelfLogger.debug("NODE0311 Received subscription reset request for unknown subscription " + subid
                         + " from provisioning server " + remoteaddr);
             }
-            return (sdir);
+            return sdir;
         } else {
             eelfLogger.debug("NODE0312 Received subscription reset request from unexpected server " + remoteaddr);
-            return (null);
+            return null;
         }
     }
 
     /**
      * Get the base directory for spool directories.
      */
-    public String getSpoolBase() {
-        return (spooldir);
+    String getSpoolBase() {
+        return spooldir;
     }
 
     /**
      * Get the key store type.
      */
-    public String getKSType() {
-        return (kstype);
+    String getKSType() {
+        return kstype;
     }
 
     /**
      * Get the key store file.
      */
-    public String getKSFile() {
-        return (ksfile);
+    String getKSFile() {
+        return ksfile;
     }
 
     /**
      * Get the key store password.
      */
-    public String getKSPass() {
-        return (kspass);
+    String getKSPass() {
+        return kspass;
     }
 
     /**
      * Get the key password.
      */
-    public String getKPass() {
-        return (kpass);
+    String getKPass() {
+        return kpass;
+    }
+
+
+    String getTstype() {
+        return tstype;
+    }
+
+    String getTsfile() {
+        return tsfile;
+    }
+
+    String getTspass() {
+        return tspass;
     }
 
     /**
      * Get the http port.
      */
-    public int getHttpPort() {
-        return (gfport);
+    int getHttpPort() {
+        return gfport;
     }
 
     /**
      * Get the https port.
      */
-    public int getHttpsPort() {
-        return (svcport);
+    int getHttpsPort() {
+        return svcport;
     }
 
     /**
      * Get the externally visible https port.
      */
-    public int getExtHttpsPort() {
-        return (port);
+    int getExtHttpsPort() {
+        return port;
     }
 
     /**
      * Get the external name of this machine.
      */
-    public String getMyName() {
-        return (myname);
+    String getMyName() {
+        return myname;
     }
 
     /**
      * Get the number of threads to use for delivery.
      */
-    public int getDeliveryThreads() {
-        return (deliverythreads);
+    int getDeliveryThreads() {
+        return deliverythreads;
     }
 
     /**
      * Get the URL for uploading the event log data.
      */
-    public String getEventLogUrl() {
-        return (eventlogurl);
+    String getEventLogUrl() {
+        return eventlogurl;
     }
 
     /**
      * Get the prefix for the names of event log files.
      */
-    public String getEventLogPrefix() {
-        return (eventlogprefix);
+    String getEventLogPrefix() {
+        return eventlogprefix;
     }
 
     /**
      * Get the suffix for the names of the event log files.
      */
-    public String getEventLogSuffix() {
-        return (eventlogsuffix);
+    String getEventLogSuffix() {
+        return eventlogsuffix;
     }
 
     /**
      * Get the interval between event log file rollovers.
      */
-    public String getEventLogInterval() {
-        return (eventloginterval);
+    String getEventLogInterval() {
+        return eventloginterval;
     }
 
     /**
      * Should I follow redirects from subscribers.
      */
     public boolean isFollowRedirects() {
-        return (followredirects);
+        return followredirects;
     }
 
     /**
      * Get the directory where the event and node log files live.
      */
-    public String getLogDir() {
-        return (logdir);
+    String getLogDir() {
+        return logdir;
     }
 
     /**
      * How long do I keep log files (in milliseconds).
      */
-    public long getLogRetention() {
-        return (logretention);
+    long getLogRetention() {
+        return logretention;
     }
 
     /**
      * Get the timer.
      */
     public Timer getTimer() {
-        return (timer);
+        return timer;
     }
 
     /**
@@ -757,7 +768,7 @@
      * @return The feed ID
      */
     public String getFeedId(String subid) {
-        return (config.getFeedId(subid));
+        return config.getFeedId(subid);
     }
 
     /**
@@ -765,53 +776,46 @@
      *
      * @return The Authorization string for this node
      */
-    public String getMyAuth() {
-        return (config.getMyAuth());
+    String getMyAuth() {
+        return config.getMyAuth();
     }
 
     /**
      * Get the fraction of free spool disk space where we start throwing away undelivered files.  This is
      * FREE_DISK_RED_PERCENT / 100.0.  Default is 0.05.  Limited by 0.01 <= FreeDiskStart <= 0.5.
      */
-    public double getFreeDiskStart() {
-        return (fdpstart);
+    double getFreeDiskStart() {
+        return fdpstart;
     }
 
     /**
      * Get the fraction of free spool disk space where we stop throwing away undelivered files.  This is
      * FREE_DISK_YELLOW_PERCENT / 100.0.  Default is 0.2.  Limited by FreeDiskStart <= FreeDiskStop <= 0.5.
      */
-    public double getFreeDiskStop() {
-        return (fdpstop);
+    double getFreeDiskStop() {
+        return fdpstop;
     }
 
     /**
      * Disable and enable protocols.
      */
-    public String[] getEnabledprotocols() {
+    String[] getEnabledprotocols() {
         return enabledprotocols;
     }
 
-    public String getAafType() {
+    String getAafType() {
         return aafType;
     }
 
-    public String getAafAction() {
+    String getAafAction() {
         return aafAction;
     }
 
-    /*
-     * Get aafURL from SWM variable
-     * */
-    public String getAafURL() {
-        return aafURL;
-    }
-
-    public boolean getCadiEnabled() {
+    boolean getCadiEnabled() {
         return cadiEnabled;
     }
 
-    public NodeAafPropsUtils getNodeAafPropsUtils() {
+    NodeAafPropsUtils getNodeAafPropsUtils() {
         return nodeAafPropsUtils;
     }
 
@@ -821,7 +825,7 @@
      * @param aafInstance The aaf instance
      * @return The permissions
      */
-    protected String getPermission(String aafInstance) {
+    String getPermission(String aafInstance) {
         try {
             String type = getAafType();
             String action = getAafAction();
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
deleted file mode 100644
index 5608630..0000000
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START==================================================
- * * org.onap.dmaap
- * * ===========================================================================
- * * Copyright © 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====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-
-package org.onap.dmaap.datarouter.node;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import java.util.EnumSet;
-import javax.servlet.DispatcherType;
-import org.eclipse.jetty.http.HttpVersion;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.HttpConfiguration;
-import org.eclipse.jetty.server.HttpConnectionFactory;
-import org.eclipse.jetty.server.SecureRequestCustomizer;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.ServerConnector;
-import org.eclipse.jetty.server.SslConnectionFactory;
-import org.eclipse.jetty.servlet.FilterHolder;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
-
-/**
- * The main starting point for the Data Router node.
- */
-public class NodeMain {
-
-    private static EELFLogger nodeMainLogger = EELFManager.getInstance().getLogger(NodeMain.class);
-    private static Delivery delivery;
-    private static NodeConfigManager nodeConfigManager;
-
-    private NodeMain() {
-    }
-
-    /**
-     * Reset the retry timer for a subscription.
-     */
-
-    static void resetQueue(String subid, String ip) {
-        delivery.resetQueue(nodeConfigManager.getSpoolDir(subid, ip));
-    }
-
-    /**
-     * Start the data router.
-     *
-     * <p>The location of the node configuration file can be set using the org.onap.dmaap.datarouter.node.properties
-     * system property. By default, it is "/opt/app/datartr/etc/node.properties".
-     */
-    public static void main(String[] args) throws Exception {
-        nodeMainLogger.debug("NODE0001 Data Router Node Starting");
-        IsFrom.setDNSCache();
-        nodeConfigManager = NodeConfigManager.getInstance();
-        nodeMainLogger.debug("NODE0002 I am " + nodeConfigManager.getMyName());
-        (new WaitForConfig(nodeConfigManager)).waitForConfig();
-        delivery = new Delivery(nodeConfigManager);
-        new LogManager(nodeConfigManager);
-
-        Server server = new Server();
-
-        // HTTP configuration
-        HttpConfiguration httpConfiguration = new HttpConfiguration();
-        httpConfiguration.setRequestHeaderSize(2048);
-
-        // HTTP connector
-        try (ServerConnector httpServerConnector = new ServerConnector(server,
-                new HttpConnectionFactory(httpConfiguration))) {
-            httpServerConnector.setPort(nodeConfigManager.getHttpPort());
-            httpServerConnector.setIdleTimeout(2000);
-
-            // HTTPS configuration
-            SslContextFactory sslContextFactory = new SslContextFactory();
-            sslContextFactory.setKeyStoreType(nodeConfigManager.getKSType());
-            sslContextFactory.setKeyStorePath(nodeConfigManager.getKSFile());
-            sslContextFactory.setKeyStorePassword(nodeConfigManager.getKSPass());
-            sslContextFactory.setKeyManagerPassword(nodeConfigManager.getKPass());
-
-            //SP-6: Fixes for SDV scan to exclude/remove DES/3DES
-            // ciphers are taken care by upgrading jdk in descriptor.xml
-            sslContextFactory.setExcludeCipherSuites(
-                    "SSL_RSA_WITH_DES_CBC_SHA",
-                    "SSL_DHE_RSA_WITH_DES_CBC_SHA",
-                    "SSL_DHE_DSS_WITH_DES_CBC_SHA",
-                    "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
-                    "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
-                    "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
-                    "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"
-            );
-
-            sslContextFactory.addExcludeProtocols("SSLv3");
-            sslContextFactory.setIncludeProtocols(nodeConfigManager.getEnabledprotocols());
-            nodeMainLogger.debug("NODE00004 Unsupported protocols node server:-"
-                    + String.join(",", sslContextFactory.getExcludeProtocols()));
-            nodeMainLogger.debug("NODE00004 Supported protocols node server:-"
-                    + String.join(",", sslContextFactory.getIncludeProtocols()));
-            nodeMainLogger.debug("NODE00004 Unsupported ciphers node server:-"
-                    + String.join(",", sslContextFactory.getExcludeCipherSuites()));
-
-            HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
-            httpsConfiguration.setRequestHeaderSize(8192);
-
-            SecureRequestCustomizer secureRequestCustomizer = new SecureRequestCustomizer();
-            secureRequestCustomizer.setStsMaxAge(2000);
-            secureRequestCustomizer.setStsIncludeSubDomains(true);
-            httpsConfiguration.addCustomizer(secureRequestCustomizer);
-
-            // HTTPS connector
-            try (ServerConnector httpsServerConnector = new ServerConnector(server,
-                    new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString()),
-                    new HttpConnectionFactory(httpsConfiguration))) {
-
-                httpsServerConnector.setPort(nodeConfigManager.getHttpsPort());
-                httpsServerConnector.setIdleTimeout(3600000);
-                httpsServerConnector.setAcceptQueueSize(2);
-
-                //Context Handler
-                ServletContextHandler servletContextHandler = new ServletContextHandler(0);
-                servletContextHandler.setContextPath("/");
-                servletContextHandler.addServlet(new ServletHolder(new NodeServlet(delivery)), "/*");
-
-                //CADI Filter activation check
-                if (nodeConfigManager.getCadiEnabled()) {
-                    servletContextHandler.addFilter(new FilterHolder(new DRNodeCadiFilter(true,
-                        nodeConfigManager.getNodeAafPropsUtils().getPropAccess())), "/*", EnumSet.of(DispatcherType.REQUEST));
-                }
-
-                server.setHandler(servletContextHandler);
-                server.setConnectors(new Connector[]{httpServerConnector, httpsServerConnector});
-            }
-        }
-
-        try {
-            server.start();
-            nodeMainLogger.debug("NODE00006 Node Server started-" + server.getState());
-        } catch (Exception e) {
-            nodeMainLogger.error("NODE00006 Jetty failed to start. Reporting will we unavailable: "
-                                         + e.getMessage(), e);
-        }
-        server.join();
-        nodeMainLogger.debug("NODE00007 Node Server joined - " + server.getState());
-    }
-
-    private static class WaitForConfig implements Runnable {
-
-        private NodeConfigManager localNodeConfigManager;
-
-        WaitForConfig(NodeConfigManager ncm) {
-            this.localNodeConfigManager = ncm;
-        }
-
-        public synchronized void run() {
-            notifyAll();
-        }
-
-        synchronized void waitForConfig() {
-            localNodeConfigManager.registerConfigTask(this);
-            while (!localNodeConfigManager.isConfigured()) {
-                nodeMainLogger.debug("NODE0003 Waiting for Node Configuration");
-                try {
-                    wait();
-                } catch (Exception exception) {
-                    nodeMainLogger.error("NodeMain: waitForConfig exception. Exception Message:- "
-                        + exception.toString(), exception);
-                }
-            }
-            localNodeConfigManager.deregisterConfigTask(this);
-            nodeMainLogger.debug("NODE0004 Node Configuration Data Received");
-        }
-    }
-}
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeRunner.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeRunner.java
new file mode 100644
index 0000000..2b151ad
--- /dev/null
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeRunner.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * ============LICENSE_START==================================================
+ * * org.onap.dmaap
+ * * ===========================================================================
+ * * Copyright © 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====================================================
+ * *
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * *
+ ******************************************************************************/
+
+package org.onap.dmaap.datarouter.node;
+
+import static java.lang.System.exit;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.eclipse.jetty.server.Server;
+
+/**
+ * The main starting point for the Data Router node.
+ */
+public class NodeRunner {
+
+    private static EELFLogger nodeMainLogger = EELFManager.getInstance().getLogger(NodeRunner.class);
+    private static NodeConfigManager nodeConfigManager;
+
+    private NodeRunner() {
+    }
+
+    /**
+     * Start the data router.
+     *
+     * <p>The location of the node configuration file can be set using the org.onap.dmaap.datarouter.node.properties
+     * system property. By default, it is "/opt/app/datartr/etc/node.properties".
+     */
+    public static void main(String[] args) {
+        nodeMainLogger.debug("NODE0001 Data Router Node Starting");
+        IsFrom.setDNSCache();
+        nodeConfigManager = NodeConfigManager.getInstance();
+        nodeMainLogger.debug("NODE0002 I am " + nodeConfigManager.getMyName());
+        (new WaitForConfig(nodeConfigManager)).waitForConfig();
+        new LogManager(nodeConfigManager);
+        try {
+            Server server = NodeServer.getServerInstance();
+            server.start();
+            server.join();
+            nodeMainLogger.debug("NODE00006 Node Server started-" + server.getState());
+        } catch (Exception e) {
+            nodeMainLogger.error("NODE00006 Jetty failed to start. Reporting will we be unavailable: "
+                                         + e.getMessage(), e);
+            exit(1);
+        }
+        nodeMainLogger.debug("NODE00007 Node Server joined");
+    }
+
+    private static class WaitForConfig implements Runnable {
+
+        private NodeConfigManager localNodeConfigManager;
+
+        WaitForConfig(NodeConfigManager ncm) {
+            this.localNodeConfigManager = ncm;
+        }
+
+        public synchronized void run() {
+            notifyAll();
+        }
+
+        synchronized void waitForConfig() {
+            localNodeConfigManager.registerConfigTask(this);
+            while (!localNodeConfigManager.isConfigured()) {
+                nodeMainLogger.debug("NODE0003 Waiting for Node Configuration");
+                try {
+                    wait();
+                } catch (Exception exception) {
+                    nodeMainLogger.error("NodeMain: waitForConfig exception. Exception Message:- "
+                        + exception.toString(), exception);
+                }
+            }
+            localNodeConfigManager.deregisterConfigTask(this);
+            nodeMainLogger.debug("NODE0004 Node Configuration Data Received");
+        }
+    }
+}
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServer.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServer.java
new file mode 100644
index 0000000..58fe72b
--- /dev/null
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServer.java
@@ -0,0 +1,147 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.datarouter.node;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import java.util.EnumSet;
+import javax.servlet.DispatcherType;
+import javax.servlet.ServletException;
+import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.SslConnectionFactory;
+import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.util.ssl.SslContextFactory;
+import org.jetbrains.annotations.NotNull;
+
+
+public class NodeServer {
+
+    private static EELFLogger eelfLogger = EELFManager.getInstance().getLogger(NodeServer.class);
+
+    private static Server server;
+    private static Delivery delivery;
+
+    private NodeServer(){
+    }
+
+    static Server getServerInstance() {
+        if (server == null) {
+            server = createNodeServer(NodeConfigManager.getInstance());
+        }
+        return server;
+    }
+
+    private static Server createNodeServer(NodeConfigManager nodeConfigManager) {
+        server = new Server();
+        delivery = new Delivery(nodeConfigManager);
+
+        HttpConfiguration httpConfiguration = new HttpConfiguration();
+        httpConfiguration.setRequestHeaderSize(2048);
+
+        // HTTP connector
+        try (ServerConnector httpServerConnector = new ServerConnector(server,
+            new HttpConnectionFactory(httpConfiguration))) {
+            httpServerConnector.setPort(nodeConfigManager.getHttpPort());
+            httpServerConnector.setIdleTimeout(2000);
+
+            SslContextFactory sslContextFactory = getSslContextFactory(nodeConfigManager);
+
+            HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
+            httpsConfiguration.setRequestHeaderSize(8192);
+
+            SecureRequestCustomizer secureRequestCustomizer = new SecureRequestCustomizer();
+            secureRequestCustomizer.setStsMaxAge(2000);
+            secureRequestCustomizer.setStsIncludeSubDomains(true);
+            httpsConfiguration.addCustomizer(secureRequestCustomizer);
+
+            // HTTPS connector
+            try (ServerConnector httpsServerConnector = new ServerConnector(server,
+                new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString()),
+                new HttpConnectionFactory(httpsConfiguration))) {
+
+                httpsServerConnector.setPort(nodeConfigManager.getHttpsPort());
+                httpsServerConnector.setIdleTimeout(3600000);
+                httpsServerConnector.setAcceptQueueSize(2);
+
+                //Context Handler
+                ServletContextHandler servletContextHandler = new ServletContextHandler(0);
+                servletContextHandler.setContextPath("/");
+                servletContextHandler.addServlet(new ServletHolder(new NodeServlet(delivery)), "/*");
+
+                //CADI Filter activation check
+                if (nodeConfigManager.getCadiEnabled()) {
+                    try {
+                        servletContextHandler.addFilter(new FilterHolder(new DRNodeCadiFilter(true,
+                                nodeConfigManager.getNodeAafPropsUtils().getPropAccess())), "/*",
+                            EnumSet.of(DispatcherType.REQUEST));
+                    } catch (ServletException e) {
+                        eelfLogger.error("Failed to add CADI Filter: " + e.getMessage(), e);
+                    }
+                }
+                server.setHandler(servletContextHandler);
+                server.setConnectors(new Connector[]{httpServerConnector, httpsServerConnector});
+            }
+        }
+        return server;
+    }
+
+    /**
+     * Reset the retry timer for a subscription.
+     */
+    static void resetQueue(String subid, String ip) {
+        delivery.resetQueue(NodeConfigManager.getInstance().getSpoolDir(subid, ip));
+    }
+
+
+    @NotNull
+    private static SslContextFactory getSslContextFactory(NodeConfigManager nodeConfigManager) {
+        SslContextFactory sslContextFactory = new SslContextFactory();
+        sslContextFactory.setKeyStoreType(nodeConfigManager.getKSType());
+        sslContextFactory.setKeyStorePath(nodeConfigManager.getKSFile());
+        sslContextFactory.setKeyStorePassword(nodeConfigManager.getKSPass());
+        sslContextFactory.setKeyManagerPassword(nodeConfigManager.getKPass());
+
+        sslContextFactory.setExcludeCipherSuites(
+            "SSL_RSA_WITH_DES_CBC_SHA",
+            "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+            "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+            "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+            "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+            "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+            "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"
+        );
+
+        sslContextFactory.addExcludeProtocols("SSLv3");
+        eelfLogger.info("Unsupported protocols: " + String.join(",", sslContextFactory.getExcludeProtocols()));
+        eelfLogger.info("Supported protocols: " + String.join(",", sslContextFactory.getIncludeProtocols()));
+        eelfLogger.info("Unsupported ciphers: " + String.join(",", sslContextFactory.getExcludeCipherSuites()));
+        eelfLogger.info("Supported ciphers: " + String.join(",", sslContextFactory.getIncludeCipherSuites()));
+        return sslContextFactory;
+    }
+}
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
index 6fd1def..388b679 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
@@ -130,7 +130,7 @@
             } else if (path.startsWith("/internal/resetSubscription/")) {
                 String subid = path.substring(28);
                 if (subid.length() != 0 && subid.indexOf('/') == -1) {
-                    NodeMain.resetQueue(subid, ip);
+                    NodeServer.resetQueue(subid, ip);
                     resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
                     return;
                 }
diff --git a/datarouter-node/src/main/resources/docker/startup.sh b/datarouter-node/src/main/resources/docker/startup.sh
index 8843b22..a71dbaa 100644
--- a/datarouter-node/src/main/resources/docker/startup.sh
+++ b/datarouter-node/src/main/resources/docker/startup.sh
@@ -12,7 +12,7 @@
 for FILE in `find $LIB -name *.jar`; do
   CLASSPATH=$CLASSPATH:$FILE
 done
-java -classpath $CLASSPATH  org.onap.dmaap.datarouter.node.NodeMain
+java -classpath $CLASSPATH  org.onap.dmaap.datarouter.node.NodeRunner
 
 runner_file="$LIB/datarouter-node-jar-with-dependencies.jar"
 echo "Starting using" $runner_file
diff --git a/datarouter-node/src/main/resources/misc/drtrnode b/datarouter-node/src/main/resources/misc/drtrnode
index 970d7d3..b0e915e 100644
--- a/datarouter-node/src/main/resources/misc/drtrnode
+++ b/datarouter-node/src/main/resources/misc/drtrnode
@@ -63,7 +63,7 @@
     chmod 755 /opt/app/datartr/spool/s
 
     rm -f /opt/app/datartr/etc/SHUTDOWN
-    nohup java org.onap.dmaap.datarouter.node.NodeMain </dev/null >/dev/null 2>&1 &
+    nohup java org.onap.dmaap.datarouter.node.NodeRunner </dev/null >/dev/null 2>&1 &
     sleep 5
     PIDS=`pids`
     if [ "$PIDS" = "" ]
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTaskTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTaskTest.java
index 0123c31..596d56a 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTaskTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTaskTest.java
@@ -23,6 +23,9 @@
 import java.io.ByteArrayOutputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -42,6 +45,8 @@
     @Mock
     private DeliveryQueue deliveryQueue;
 
+    private ExecutorService executorService;
+
     @Before
     public void setUp() throws Exception {
         DestInfo destInfo = getPrivDestInfo();
@@ -86,15 +91,23 @@
     }
 
     @Test
-    public void Validate_Delivery_Tasks_Success_For_Standard_File() {
+    public void Validate_Delivery_Tasks_Success_For_Standard_File() throws InterruptedException {
         DeliveryTask task = new DeliveryTask(deliveryQueue, "123456789.test-dr-node");
-        task.run();
+        executorService = Executors.newSingleThreadExecutor();
+        executorService.execute(task);
+
+        executorService.shutdown();
+        executorService.awaitTermination(2, TimeUnit.SECONDS);
     }
 
     @Test
-    public void Validate_Delivery_Tasks_Success_For_Compressed_File() {
+    public void Validate_Delivery_Tasks_Success_For_Compressed_File() throws InterruptedException {
         DeliveryTask task = new DeliveryTask(deliveryQueue, "123456789.test-dr-node.gz");
-        task.run();
+        executorService = Executors.newSingleThreadExecutor();
+        executorService.execute(task);
+
+        executorService.shutdown();
+        executorService.awaitTermination(2, TimeUnit.SECONDS);
     }
 
     private DestInfo getPrivDestInfo() {
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java
index c18528e..fe9b43c 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java
@@ -309,10 +309,9 @@
 
     }
 
-
     @Test
     public void Given_call_to_EelfMsgs_return_the_correct_enum(){
-        assertEquals(MESSAGE_WITH_BEHALF.toString(), "MESSAGE_WITH_BEHALF");
+        assertEquals("MESSAGE_WITH_BEHALF", MESSAGE_WITH_BEHALF.toString());
     }
 
 }
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtilsTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtilsTest.java
index aa5368b..927b8be 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtilsTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeAafPropsUtilsTest.java
@@ -22,18 +22,20 @@
 import java.io.File;
 import java.io.IOException;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
 public class NodeAafPropsUtilsTest {
 
+    private NodeAafPropsUtils nodeAafPropsUtils;
+
+    @Before
+    public void setUp() throws IOException {
+        nodeAafPropsUtils = new NodeAafPropsUtils(new File("src/test/resources/aaf/org.onap.dmaap-dr.props"));
+    }
+
     @Test
     public void Veirfy_Aaf_Pass_Decryp_Successful() {
-        NodeAafPropsUtils nodeAafPropsUtils = null;
-        try {
-            nodeAafPropsUtils = new NodeAafPropsUtils(new File("src/test/resources/aaf/org.onap.dmaap-dr.props"));
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
         Assert.assertEquals("tVac2#@Stx%tIOE^x[c&2fgZ", nodeAafPropsUtils.getDecryptedPass("cadi_keystore_password"));
     }
 }
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigManagerTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigManagerTest.java
index 578053a..9c94572 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigManagerTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigManagerTest.java
@@ -20,30 +20,69 @@
 
 package org.onap.dmaap.datarouter.node;
 
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.URL;
+import java.net.URLStreamHandler;
+import java.net.URLStreamHandlerFactory;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.commons.io.FileUtils;
+import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.mockito.Mock;
 import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
+import sun.net.www.URLConnection;
 
-@RunWith(PowerMockRunner.class)
 @PowerMockIgnore({"javax.net.ssl.*", "javax.security.auth.x500.X500Principal", "javax.crypto.*"})
-@PrepareForTest({InetAddress.class, URL.class})
+@PrepareForTest({InetAddress.class})
 public class NodeConfigManagerTest {
 
-    private NodeConfigManager nodeConfigManager = NodeConfigManager.getInstance();
+    private static HttpUrlStreamHandler httpUrlStreamHandler;
+
+    @Mock
+    InputStream inputStream;
+
+    @Mock
+    NodeConfig nodeConfig;
 
     @BeforeClass
     public static void init() {
         System.setProperty("org.onap.dmaap.datarouter.node.properties", "src/test/resources/node_test.properties");
+        // Allows for mocking URL connections
+        URLStreamHandlerFactory urlStreamHandlerFactory = mock(URLStreamHandlerFactory.class);
+        URL.setURLStreamHandlerFactory(urlStreamHandlerFactory);
+        httpUrlStreamHandler = new HttpUrlStreamHandler();
+        given(urlStreamHandlerFactory.createURLStreamHandler("https")).willReturn(httpUrlStreamHandler);
+    }
+
+    @Before
+    public void reset() throws IOException {
+        String href = "https://dmaap-dr-prov:8443/internal/prov";
+        URLConnection urlConnection = mock(URLConnection.class);
+        httpUrlStreamHandler.addConnection(new URL(href), urlConnection);
+        //File prov = new File("src/test/resources/prov_data.json");
+        InputStream anyInputStream = new ByteArrayInputStream(Files.readAllBytes(Paths.get("src/test/resources/prov_data.json")));
+        when(urlConnection.getInputStream()).thenReturn(anyInputStream);
+    }
+
+    @After
+    public void resetHandler() {
+        httpUrlStreamHandler.resetConnections();
     }
 
     @AfterClass
@@ -54,6 +93,7 @@
 
     @Test
     public void Verify_NodeConfigMan_Getters() {
+        NodeConfigManager nodeConfigManager = NodeConfigManager.getInstance();
         Assert.assertEquals("legacy", nodeConfigManager.getAafInstance());
         Assert.assertEquals("src/test/resources/spool/f", nodeConfigManager.getSpoolDir());
         Assert.assertEquals("src/test/resources/spool", nodeConfigManager.getSpoolBase());
@@ -70,10 +110,55 @@
         Assert.assertEquals(new String[] {"TLSv1.1", "TLSv1.2"}, nodeConfigManager.getEnabledprotocols());
         Assert.assertEquals("org.onap.dmaap-dr.feed", nodeConfigManager.getAafType());
         Assert.assertEquals("publish", nodeConfigManager.getAafAction());
-        Assert.assertEquals("https://aaf-locate:8095", nodeConfigManager.getAafURL());
         Assert.assertFalse(nodeConfigManager.getCadiEnabled());
         Assert.assertFalse(nodeConfigManager.isShutdown());
-        Assert.assertFalse(nodeConfigManager.isConfigured());
+        Assert.assertTrue(nodeConfigManager.isConfigured());
+        Assert.assertEquals("legacy", nodeConfigManager.getAafInstance("1"));
+        Assert.assertNotNull(nodeConfigManager.getPublishId());
+        Assert.assertNotNull(nodeConfigManager.getAllDests());
+        Assert.assertEquals(10000, nodeConfigManager.getInitFailureTimer());
+        Assert.assertEquals(600000, nodeConfigManager.getWaitForFileProcessFailureTimer());
+        Assert.assertEquals(3600000, nodeConfigManager.getMaxFailureTimer());
+        Assert.assertEquals(2.0, nodeConfigManager.getFailureBackoff(),0.0);
+        Assert.assertEquals(86400000, nodeConfigManager.getExpirationTimer());
+        Assert.assertEquals(100, nodeConfigManager.getFairFileLimit());
+        Assert.assertEquals(60000, nodeConfigManager.getFairTimeLimit());
+        Assert.assertNotNull(nodeConfigManager.getTargets("1"));
+        Assert.assertEquals("src/test/resources/spool/f", nodeConfigManager.getSpoolDir());
+        Assert.assertEquals("src/test/resources/aaf/org.onap.dmaap-dr.p12", nodeConfigManager.getKSFile());
+        Assert.assertEquals("jks", nodeConfigManager.getTstype());
+        Assert.assertEquals("src/test/resources/aaf/org.onap.dmaap-dr.trust.jks", nodeConfigManager.getTsfile());
+        Assert.assertEquals(40, nodeConfigManager.getDeliveryThreads());
+        Assert.assertEquals("30", nodeConfigManager.getEventLogInterval());
+        Assert.assertFalse(nodeConfigManager.isFollowRedirects());
+        Assert.assertNotNull(nodeConfigManager.getTimer());
+        Assert.assertEquals("1", nodeConfigManager.getFeedId("1"));
+        Assert.assertEquals("Basic ZG1hYXAtZHItbm9kZTpsaEFUNHY2N3F3blY3QVFxV3ByMm84WXNuVjg9", nodeConfigManager.getMyAuth());
+        Assert.assertEquals(0.05, nodeConfigManager.getFreeDiskStart(), 0.0);
+        Assert.assertEquals(0.2, nodeConfigManager.getFreeDiskStop(), 0.0);
+        Assert.assertEquals("org.onap.dmaap-dr.feed|legacy|publish", nodeConfigManager.getPermission("legacy"));
     }
 
+    /**
+     * {@link URLStreamHandler} that allows us to control the {@link URLConnection URLConnections} that are returned
+     * by {@link URL URLs} in the code under test.
+     */
+    public static class HttpUrlStreamHandler extends URLStreamHandler {
+
+        private Map<URL, URLConnection> connections = new HashMap();
+
+        @Override
+        protected URLConnection openConnection(URL url) {
+            return connections.get(url);
+        }
+
+        void resetConnections() {
+            connections = new HashMap();
+        }
+
+        HttpUrlStreamHandler addConnection(URL url, URLConnection urlConnection) {
+            connections.put(url, urlConnection);
+            return this;
+        }
+    }
 }
\ No newline at end of file
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServerTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServerTest.java
new file mode 100644
index 0000000..f72e581
--- /dev/null
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServerTest.java
@@ -0,0 +1,119 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.dmaap.datarouter.node;
+
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.File;
+import java.io.IOException;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@SuppressStaticInitializationFor("org.onap.dmaap.datarouter.node.NodeConfigManager")
+public class NodeServerTest {
+
+    private NodeConfigManager config = mock(NodeConfigManager.class);
+    @Before
+    public void setUp() throws Exception {
+        setUpConfig();
+        setUpNodeMainDelivery();
+        createFilesAndDirectories();
+        mock(Delivery.class);
+    }
+
+    @AfterClass
+    public static void tearDown() {
+        deleteCreatedDirectories();
+    }
+
+    @Test
+    public void Verify_Node_Server_Is_Configured_Correctly() {
+        Assert.assertNotNull(NodeServer.getServerInstance());
+    }
+
+    private void setUpConfig() throws IllegalAccessException {
+        PowerMockito.mockStatic(NodeConfigManager.class);
+        when(config.isShutdown()).thenReturn(false);
+        when(config.isConfigured()).thenReturn(true);
+        when(config.getSpoolDir()).thenReturn("spool/f");
+        when(config.getSpoolBase()).thenReturn("spool");
+        when(config.getLogDir()).thenReturn("log/dir");
+        when(config.getPublishId()).thenReturn("User1");
+        when(config.isAnotherNode(anyString(), anyString())).thenReturn(true);
+        when(config.getEventLogInterval()).thenReturn("40");
+        when(config.isDeletePermitted("1")).thenReturn(true);
+        when(config.getAllDests()).thenReturn(new DestInfo[0]);
+        when(config.getKSType()).thenReturn("PKCS12");
+        when(config.getKSFile()).thenReturn("src/test/resources/aaf/org.onap.dmaap-dr.p12");
+        when(config.getKSPass()).thenReturn("tVac2#@Stx%tIOE^x[c&2fgZ");
+        when(config.getTstype()).thenReturn("jks");
+        when(config.getTsfile()).thenReturn("src/test/resources/aaf/org.onap.dmaap-dr.trust.jks");
+        when(config.getTspass()).thenReturn("XHX$2Vl?Lk*2CB.i1+ZFAhZd");
+        FieldUtils.writeDeclaredStaticField(NodeServlet.class, "config", config, true);
+        FieldUtils.writeDeclaredStaticField(NodeRunner.class, "nodeConfigManager", config, true);
+        PowerMockito.when(NodeConfigManager.getInstance()).thenReturn(config);
+    }
+
+    private void setUpNodeMainDelivery() throws IllegalAccessException{
+        Delivery delivery = mock(Delivery.class);
+        doNothing().when(delivery).resetQueue(anyObject());
+        FieldUtils.writeDeclaredStaticField(NodeServer.class, "delivery", delivery, true);
+    }
+
+    private void createFilesAndDirectories() throws IOException {
+        File nodeDir = new File("spool/n/172.0.0.1");
+        File spoolDir = new File("spool/s/0/1");
+        File dataFile = new File("spool/s/0/1/dmaap-dr-node.1234567");
+        File metaDataFile = new File("spool/s/0/1/dmaap-dr-node.1234567.M");
+        nodeDir.mkdirs();
+        spoolDir.mkdirs();
+        dataFile.createNewFile();
+        metaDataFile.createNewFile();
+    }
+
+    private static void deleteCreatedDirectories() {
+        File spoolDir = new File("spool");
+        delete(spoolDir);
+    }
+
+    private static void delete(File file) {
+        if (file.isDirectory()) {
+            for (File f: file.listFiles()) {
+                delete(f);
+            }
+        }
+        if (!file.delete()) {
+            System.out.println("Failed to delete: " + file);
+        }
+    }
+
+}
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java
index b3db320..136e21d 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java
@@ -307,7 +307,7 @@
         when(config.isDeletePermitted("1")).thenReturn(true);
         when(config.getAllDests()).thenReturn(new DestInfo[0]);
         FieldUtils.writeDeclaredStaticField(NodeServlet.class, "config", config, true);
-        FieldUtils.writeDeclaredStaticField(NodeMain.class, "nodeConfigManager", config, true);
+        FieldUtils.writeDeclaredStaticField(NodeRunner.class, "nodeConfigManager", config, true);
         PowerMockito.when(NodeConfigManager.getInstance()).thenReturn(config);
     }
 
@@ -318,7 +318,7 @@
         when(config.isConfigured()).thenReturn(true);
         when(config.isDeletePermitted("1")).thenReturn(false);
         FieldUtils.writeDeclaredStaticField(NodeServlet.class, "config", config, true);
-        FieldUtils.writeDeclaredStaticField(NodeMain.class, "nodeConfigManager", config, true);
+        FieldUtils.writeDeclaredStaticField(NodeRunner.class, "nodeConfigManager", config, true);
         PowerMockito.when(NodeConfigManager.getInstance()).thenReturn(config);
     }
 
@@ -329,14 +329,14 @@
         when(config.isConfigured()).thenReturn(true);
         when(config.isDeletePermitted("1")).thenThrow(new NullPointerException());
         FieldUtils.writeDeclaredStaticField(NodeServlet.class, "config", config, true);
-        FieldUtils.writeDeclaredStaticField(NodeMain.class, "nodeConfigManager", config, true);
+        FieldUtils.writeDeclaredStaticField(NodeRunner.class, "nodeConfigManager", config, true);
         PowerMockito.when(NodeConfigManager.getInstance()).thenReturn(config);
     }
 
     private void setUpNodeMainDelivery() throws IllegalAccessException{
         Delivery delivery = mock(Delivery.class);
         doNothing().when(delivery).resetQueue(anyObject());
-        FieldUtils.writeDeclaredStaticField(NodeMain.class, "delivery", delivery, true);
+        FieldUtils.writeDeclaredStaticField(NodeServer.class, "delivery", delivery, true);
     }
 
     private void setNodeConfigManagerIsConfiguredToReturnFalse() throws IllegalAccessException{
diff --git a/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.cred.props b/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.cred.props
index 3f081b5..70d0190 100644
--- a/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.cred.props
+++ b/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.cred.props
@@ -12,6 +12,6 @@
 cadi_keystore_password=enc:NwhywpJzc4rlcpwkPRs4GWkOliMQDb8d7kmKKK2QwtwQu4Q7i_psLw0baQ-NY3mF
 cadi_keystore_password_jks=enc:McsNbnuHb5tgoa_UMgdTdHqWEG4bt6VcPsc_NTzS277aDcrNRutDSBDYyyLD5no2
 cadi_keystore_password_p12=enc:NwhywpJzc4rlcpwkPRs4GWkOliMQDb8d7kmKKK2QwtwQu4Q7i_psLw0baQ-NY3mF
-cadi_truststore=/opt/app/osaaf/local/org.onap.dmaap-dr.trust.jks
+cadi_truststore=src/test/resources/aaf/org.onap.dmaap-dr.trust.jks
 cadi_truststore_password=enc:xWbQBg4WdbHbQgvKGrol0ns16g9jgFYteR3nQkwTl65BtvtWf_ZKhSVP8w_Z0VHU
 cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
diff --git a/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.trust.jks b/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.trust.jks
new file mode 100644
index 0000000..c837fa0
--- /dev/null
+++ b/datarouter-node/src/test/resources/aaf/org.onap.dmaap-dr.trust.jks
Binary files differ
diff --git a/datarouter-node/src/test/resources/prov_data.json b/datarouter-node/src/test/resources/prov_data.json
new file mode 100644
index 0000000..cf455c7
--- /dev/null
+++ b/datarouter-node/src/test/resources/prov_data.json
@@ -0,0 +1,129 @@
+{
+  "feeds": [
+    {
+      "suspend": false,
+      "groupid": 0,
+      "description": "Default feed provisioned for PM File collector",
+      "version": "m1.0",
+      "authorization": {
+        "endpoint_addrs": [
+
+        ],
+        "classification": "unclassified",
+        "endpoint_ids": [
+          {
+            "password": "dradmin",
+            "id": "dradmin"
+          }
+        ]
+      },
+      "last_mod": 1560871903000,
+      "deleted": false,
+      "feedid": 1,
+      "name": "Default PM Feed",
+      "business_description": "Default Feed",
+      "aaf_instance": "legacy",
+      "publisher": "dradmin",
+      "links": {
+        "subscribe": "https://dmaap-dr-prov/subscribe/1",
+        "log": "https://dmaap-dr-prov/feedlog/1",
+        "publish": "https://dmaap-dr-prov/publish/1",
+        "self": "https://dmaap-dr-prov/feed/1"
+      },
+      "created_date": 1560871903000
+    }
+  ],
+  "groups": [
+    {
+      "authid": "GROUP-0000-c2754bb7-92ef-4869-9c6b-1bc1283be4c0",
+      "name": "Test Group",
+      "description": "Test Description of Group .",
+      "classification": "publisher/subscriber",
+      "members": "{id=attuid, name=User1}, {id=attuid, name=User 2]"
+    }
+  ],
+  "subscriptions": [
+    {
+      "suspend": false,
+      "delivery": {
+        "use100": true,
+        "password": "PASSWORD",
+        "user": "LOGIN",
+        "url": "https://dcae-pm-mapper:8443/delivery"
+      },
+      "subscriber": "dradmin",
+      "groupid": 0,
+      "metadataOnly": false,
+      "privilegedSubscriber": true,
+      "subid": 1,
+      "last_mod": 1560872889000,
+      "feedid": 1,
+      "follow_redirect": false,
+      "decompress": true,
+      "aaf_instance": "legacy",
+      "links": {
+        "feed": "https://dmaap-dr-prov/feed/1",
+        "log": "https://dmaap-dr-prov/sublog/1",
+        "self": "https://dmaap-dr-prov/subs/1"
+      },
+      "created_date": 1560872889000
+    }
+  ],
+  "parameters": {
+    "ACTIVE_POD": "dmaap-dr-prov",
+    "DELIVERY_FILE_PROCESS_INTERVAL": 600,
+    "DELIVERY_INIT_RETRY_INTERVAL": 10,
+    "DELIVERY_MAX_AGE": 86400,
+    "DELIVERY_MAX_RETRY_INTERVAL": 3600,
+    "DELIVERY_RETRY_RATIO": 2,
+    "LOGROLL_INTERVAL": 30,
+    "NODES": [
+      "dmaap-dr-node"
+    ],
+    "PROV_ACTIVE_NAME": "dmaap-dr-prov",
+    "PROV_AUTH_ADDRESSES": [
+      "dmaap-dr-prov",
+      "dmaap-dr-node"
+    ],
+    "PROV_AUTH_SUBJECTS": [
+      ""
+    ],
+    "PROV_DOMAIN": "",
+    "PROV_MAXFEED_COUNT": 10000,
+    "PROV_MAXSUB_COUNT": 100000,
+    "PROV_NAME": "dmaap-dr-prov",
+    "PROV_REQUIRE_CERT": "false",
+    "PROV_REQUIRE_SECURE": "true",
+    "STANDBY_POD": "",
+    "_INT_VALUES": [
+      "LOGROLL_INTERVAL",
+      "PROV_MAXFEED_COUNT",
+      "PROV_MAXSUB_COUNT",
+      "DELIVERY_INIT_RETRY_INTERVAL",
+      "DELIVERY_MAX_RETRY_INTERVAL",
+      "DELIVERY_RETRY_RATIO",
+      "DELIVERY_MAX_AGE",
+      "DELIVERY_FILE_PROCESS_INTERVAL"
+    ]
+  },
+  "ingress": [
+    {
+      "feedid": 1,
+      "subnet": "",
+      "user": "",
+      "node": [
+        "stub_from."
+      ]
+    }
+  ],
+  "egress": {
+    "1": "stub_to."
+  },
+  "routing": [
+    {
+      "from": 1,
+      "to": 3,
+      "via": 2
+    }
+  ]
+}
\ No newline at end of file
