Merge "change mr default port to https:3905"
diff --git a/datafile-app-server/config/application.yaml b/datafile-app-server/config/application.yaml
index 504a6f3..bae8025 100644
--- a/datafile-app-server/config/application.yaml
+++ b/datafile-app-server/config/application.yaml
@@ -23,4 +23,4 @@
     org.onap.dcaegen2.collectors.datafile: WARN
   file: /var/log/ONAP/application.log
 app:
-  filepath: /opt/app/datafile/config/datafile_endpoints.json
+  filepath: src/test/resources/datafile_endpoints_test.json
diff --git a/datafile-app-server/config/datafile_endpoints.json b/datafile-app-server/config/datafile_endpoints.json
deleted file mode 100644
index e1e857d..0000000
--- a/datafile-app-server/config/datafile_endpoints.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-  "config": {
-    "//description": "This file is only used for testing purposes",
-    "dmaap.ftpesConfig.keyCert": "/config/dfc.jks",
-    "dmaap.ftpesConfig.keyPassword": "secret",
-    "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
-    "dmaap.ftpesConfig.trustedCaPassword": "secret",
-    "dmaap.security.trustStorePath": "change it",
-    "dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
-    "dmaap.security.keyStorePath": "keyStorePath",
-    "dmaap.security.keyStorePasswordPath": "change it",
-    "dmaap.security.enableDmaapCertAuth": "false",
-    "streams_publishes": {
-      "PM_MEAS_FILES": {
-        "type": "data_router",
-        "dmaap_info": {
-          "username": "CYE9fl40",
-          "location": "loc00",
-          "log_url": "https://dmaap-dr-prov/feedlog/4",
-          "publisher_id": "4.307dw",
-          "password": "izBJD8nLjawq0HMG",
-          "publish_url": "https://dmaap-dr-prov/publish/4"
-        }
-      }
-    },
-    "streams_subscribes": {
-      "dmaap_subscriber": {
-        "dmaap_info": {
-          "topic_url": "http://dradmin:dradmin@localhost:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
-        },
-        "type": "message_router"
-      }
-    }
-  }
-}
-
diff --git a/datafile-app-server/pom.xml b/datafile-app-server/pom.xml
index 7695bda..6b0ebe4 100644
--- a/datafile-app-server/pom.xml
+++ b/datafile-app-server/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.collectors</groupId>
     <artifactId>datafile</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.2.2-SNAPSHOT</version>
   </parent>
 
   <groupId>org.onap.dcaegen2.collectors.datafile</groupId>
@@ -35,8 +35,6 @@
   <properties>
     <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
-    <spring.version>5.1.4.RELEASE</spring.version>
-    <spring-boot.version>2.1.2.RELEASE</spring-boot.version>
   </properties>
 
   <dependencies>
@@ -124,22 +122,18 @@
     <dependency>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>
-      <version>2.0.1.Final</version>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot</artifactId>
-      <version>${spring-boot.version}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
-      <version>${spring.version}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-webmvc</artifactId>
-      <version>${spring.version}</version>
     </dependency>
     <dependency>
       <groupId>com.spotify</groupId>
@@ -149,17 +143,14 @@
     <dependency>
       <groupId>org.apache.tomcat.embed</groupId>
       <artifactId>tomcat-embed-core</artifactId>
-      <version>9.0.14</version>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-webflux</artifactId>
-      <version>${spring.version}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-autoconfigure</artifactId>
-      <version>${spring-boot.version}</version>
     </dependency>
     <dependency>
       <groupId>io.springfox</groupId>
diff --git a/datafile-app-server/src/main/docker/Dockerfile b/datafile-app-server/src/main/docker/Dockerfile
index 6f62e65..7343128 100644
--- a/datafile-app-server/src/main/docker/Dockerfile
+++ b/datafile-app-server/src/main/docker/Dockerfile
@@ -23,10 +23,8 @@
 RUN mkdir -p /var/log/ONAP
 
 ADD /target/datafile-app-server.jar /opt/app/datafile/
-
 ADD /config/application.yaml /opt/app/datafile/config/
 ADD /config/dfc.jks.b64 /opt/app/datafile/config/
-ADD /config/datafile_endpoints.json /opt/app/datafile/config/
 ADD /config/ftp.jks.b64 /opt/app/datafile/config/
 
 EXPOSE 8100 8433
@@ -40,4 +38,4 @@
 
 USER datafile
 
-ENTRYPOINT ["/usr/bin/java", "-jar", "/opt/app/datafile/datafile-app-server.jar"]
\ No newline at end of file
+ENTRYPOINT ["/usr/bin/java", "-jar", "/opt/app/datafile/datafile-app-server.jar"]
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfig.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfig.java
index 6e9f770..58081a8 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfig.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfig.java
@@ -99,8 +99,10 @@
     }
 
     Flux<AppConfig> createRefreshTask(Map<String, String> context) {
-        return getEnvironment(systemEnvironment, context).flatMap(this::createCbsClient)
-            .flatMapMany(this::periodicConfigurationUpdates).map(this::parseCloudConfig)
+        return getEnvironment(systemEnvironment, context) //
+            .flatMap(this::createCbsClient) //
+            .flatMapMany(this::periodicConfigurationUpdates) //
+            .map(this::parseCloudConfig) //
             .onErrorResume(this::onErrorResume);
     }
 
@@ -208,22 +210,17 @@
                 throw new JsonSyntaxException("Root is not a json object");
             }
             parseCloudConfig(rootObject);
+            logger.info("Local configuration file loaded: {}", filepath);
         } catch (JsonSyntaxException | IOException e) {
-            logger.warn("Local configuration file not loaded: {}", filepath, e);
+            logger.trace("Local configuration file not loaded: {}", filepath, e);
         }
     }
 
-    private synchronized void setConfiguration(ConsumerConfiguration consumerConfiguration,
-        Map<String, PublisherConfiguration> publisherConfiguration, FtpesConfig ftpesConfig) {
-        if (consumerConfiguration == null || publisherConfiguration == null || ftpesConfig == null) {
-            logger.error(
-                "Problem with configuration consumerConfiguration: {}, publisherConfiguration: {}, ftpesConfig: {}",
-                consumerConfiguration, publisherConfiguration, ftpesConfig);
-        } else {
-            this.dmaapConsumerConfiguration = consumerConfiguration;
-            this.publishingConfigurations = publisherConfiguration;
-            this.ftpesConfiguration = ftpesConfig;
-        }
+    private synchronized void setConfiguration(@NotNull ConsumerConfiguration consumerConfiguration,
+            @NotNull Map<String, PublisherConfiguration> publisherConfiguration, @NotNull FtpesConfig ftpesConfig) {
+        this.dmaapConsumerConfiguration = consumerConfiguration;
+        this.publishingConfigurations = publisherConfiguration;
+        this.ftpesConfiguration = ftpesConfig;
     }
 
     JsonElement getJsonElement(JsonParser parser, InputStream inputStream) {
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java
index d9a9b76..fc550ab 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java
@@ -25,6 +25,9 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
+
+import javax.validation.constraints.NotNull;
+
 import java.util.Set;
 
 import org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException;
@@ -57,14 +60,12 @@
      *
      * @throws DatafileTaskException if a member of the configuration is missing.
      */
-    public Map<String, PublisherConfiguration> getDmaapPublisherConfigurations() throws DatafileTaskException {
+    public @NotNull Map<String, PublisherConfiguration> getDmaapPublisherConfigurations() throws DatafileTaskException {
         JsonObject producerCfgs = jsonObject.get("streams_publishes").getAsJsonObject();
         Iterator<String> changeIdentifierList = producerCfgs.keySet().iterator();
-
         Map<String, PublisherConfiguration> result = new HashMap<>();
 
         while (changeIdentifierList.hasNext()) {
-
             String changeIdentifier = changeIdentifierList.next();
             JsonObject producerCfg = getAsJson(producerCfgs, changeIdentifier);
             JsonObject feedConfig = get(producerCfg, "dmaap_info").getAsJsonObject();
@@ -85,7 +86,6 @@
             result.put(cfg.changeIdentifier(), cfg);
         }
         return result;
-
     }
 
     /**
@@ -94,7 +94,7 @@
      * @return the consumer configuration.
      * @throws DatafileTaskException if a member of the configuration is missing.
      */
-    public ConsumerConfiguration getDmaapConsumerConfig() throws DatafileTaskException {
+    public @NotNull ConsumerConfiguration getDmaapConsumerConfig() throws DatafileTaskException {
         JsonObject consumerCfg = jsonObject.get("streams_subscribes").getAsJsonObject();
         Set<Entry<String, JsonElement>> topics = consumerCfg.entrySet();
         if (topics.size() != 1) {
@@ -119,7 +119,7 @@
      * @return the xNF communication security configuration.
      * @throws DatafileTaskException if a member of the configuration is missing.
      */
-    public FtpesConfig getFtpesConfig() throws DatafileTaskException {
+    public @NotNull FtpesConfig getFtpesConfig() throws DatafileTaskException {
         return new ImmutableFtpesConfig.Builder() //
             .keyCert(getAsString(jsonObject, "dmaap.ftpesConfig.keyCert"))
             .keyPassword(getAsString(jsonObject, "dmaap.ftpesConfig.keyPassword"))
@@ -128,7 +128,7 @@
             .build();
     }
 
-    private static JsonElement get(JsonObject obj, String memberName) throws DatafileTaskException {
+    private static @NotNull JsonElement get(JsonObject obj, String memberName) throws DatafileTaskException {
         JsonElement elem = obj.get(memberName);
         if (elem == null) {
             throw new DatafileTaskException("Could not find member: " + memberName + " in: " + obj);
@@ -136,11 +136,11 @@
         return elem;
     }
 
-    private static String getAsString(JsonObject obj, String memberName) throws DatafileTaskException {
+    private static @NotNull String getAsString(JsonObject obj, String memberName) throws DatafileTaskException {
         return get(obj, memberName).getAsString();
     }
 
-    private static JsonObject getAsJson(JsonObject obj, String memberName) throws DatafileTaskException {
+    private static @NotNull JsonObject getAsJson(JsonObject obj, String memberName) throws DatafileTaskException {
         return get(obj, memberName).getAsJsonObject();
     }
 
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/ftp/Scheme.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/ftp/Scheme.java
index e5ca935..c10c0f1 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/ftp/Scheme.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/ftp/Scheme.java
@@ -37,7 +37,7 @@
      *
      * @param schemeString the string to convert to <code>Scheme</code>.
      * @return The corresponding <code>Scheme</code>
-     * @throws Exception if the value of the string doesn't match any defined scheme.
+     * @throws DatafileTaskException if the value of the string doesn't match any defined scheme.
      */
     public static Scheme getSchemeFromString(String schemeString) throws DatafileTaskException {
         Scheme result;
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/Counters.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/Counters.java
index 878bb55..8e8d847 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/Counters.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/Counters.java
@@ -100,9 +100,9 @@
         return str.toString();
     }
 
-    private String format(String name, Object value) {
+    private static String format(String name, Object value) {
         String header = name + ":";
-        return String.format("%-24s%-22s\n", header, value);
+        return String.format("%-24s%-22s%n", header, value);
     }
 
     public int getNoOfCollectedFiles() {
@@ -132,21 +132,4 @@
     public int getTotalReceivedEvents() {
         return totalReceivedEvents;
     }
-
-    /**
-     * Resets all data.
-     */
-    public void clear() {
-        numberOfTasks.set(0);
-        numberOfSubscriptions.set(0);
-        noOfCollectedFiles = 0;
-        noOfFailedFtpAttempts = 0;
-        noOfFailedFtp = 0;
-        noOfFailedPublishAttempts = 0;
-        totalPublishedFiles = 0;
-        noOfFailedPublish = 0;
-        lastPublishedTime = Instant.MIN;
-        totalReceivedEvents = 0;
-        lastEventTime = Instant.MIN;
-    }
 }
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/logging/MappedDiagnosticContext.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/logging/MappedDiagnosticContext.java
index 72d1843..18a30ee 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/logging/MappedDiagnosticContext.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/logging/MappedDiagnosticContext.java
@@ -50,12 +50,10 @@
      */
     public static void appendTraceInfo(HttpRequestBase httpRequest) {
         String requestId = MDC.get(MdcVariables.REQUEST_ID);
-        httpRequest.addHeader(MdcVariables.X_ONAP_REQUEST_ID, requestId);
         httpRequest.addHeader("X-RequestID", requestId); // deprecated
         httpRequest.addHeader("X-TransactionID", requestId); // deprecated
 
         String invocationId = UUID.randomUUID().toString();
-        httpRequest.addHeader(MdcVariables.X_INVOCATION_ID, invocationId);
         logger.info(INVOKE, "Invoking request with invocation ID {}", invocationId);
     }
 
@@ -65,11 +63,11 @@
      * @param headers a received HTPP header
      */
     public static void initializeTraceContext(HttpHeaders headers) {
-        String requestId = headers.getFirst(MdcVariables.X_ONAP_REQUEST_ID);
+        String requestId = headers.getFirst(MdcVariables.httpHeader(MdcVariables.REQUEST_ID));
         if (StringUtils.isBlank(requestId)) {
             requestId = UUID.randomUUID().toString();
         }
-        String invocationId = headers.getFirst(MdcVariables.X_INVOCATION_ID);
+        String invocationId = headers.getFirst(MdcVariables.httpHeader(MdcVariables.INVOCATION_ID));
         if (StringUtils.isBlank(invocationId)) {
             invocationId = UUID.randomUUID().toString();
         }
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DMaaPMessageConsumer.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DMaaPMessageConsumer.java
index 9c33484..066983a 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DMaaPMessageConsumer.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DMaaPMessageConsumer.java
@@ -68,8 +68,8 @@
     public Flux<FileReadyMessage> getMessageRouterResponse() {
         logger.trace("getMessageRouterResponse called");
         try {
-            DMaaPConsumerReactiveHttpClient dMaaPConsumerReactiveHttpClient = createHttpClient();
-            return consume((dMaaPConsumerReactiveHttpClient.getDMaaPConsumerResponse(Optional.empty())));
+            DMaaPConsumerReactiveHttpClient client = createHttpClient();
+            return consume((client.getDMaaPConsumerResponse(Optional.empty())));
         } catch (DatafileTaskException e) {
             logger.warn("Unable to get response from message router", e);
             return Flux.empty();
@@ -82,7 +82,6 @@
     }
 
     public DMaaPConsumerReactiveHttpClient createHttpClient() throws DatafileTaskException {
-
         return httpClientFactory.create(datafileAppConfig.getDmaapConsumerConfiguration().toDmaap());
     }
 
diff --git a/datafile-app-server/src/main/resources/application.properties b/datafile-app-server/src/main/resources/application.properties
deleted file mode 100644
index 2b9d7b1..0000000
--- a/datafile-app-server/src/main/resources/application.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-spring.profiles.active=prod
-server.port=8433
-server.ssl.key-store-type=PKCS12
-server.ssl.key-store-password=ericssondfc
-server.ssl.key-store=classpath:keystore.jks
-server.ssl.key-password=ericssondfc
-server.ssl.key-alias=tomcat-localhost
-logging.level.root=ERROR
-logging.level.org.springframework=ERROR
-logging.level.org.springframework.data=ERROR
-logging.level.org.onap.dcaegen2.collectors.datafile=INFO
-logging.file=logs/log/application.log
-app.filepath=config/datafile_endpoints.json
diff --git a/datafile-app-server/src/main/resources/scheduled-context.xml b/datafile-app-server/src/main/resources/scheduled-context.xml
deleted file mode 100644
index 2199631..0000000
--- a/datafile-app-server/src/main/resources/scheduled-context.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:task="http://www.springframework.org/schema/task"
-    xmlns:context="http://www.springframework.org/schema/context"
-    xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd
-        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
-
-    <context:component-scan
-        base-package="org.onap.dcaegen2.collectors.datafile" />
-    <task:scheduled-tasks>
-        <task:scheduled ref="scheduleController"
-            method="startTasks" fixed-rate="1000" />
-    </task:scheduled-tasks>
-</beans>
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java
index f661dd0..c20dc2f 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java
@@ -76,11 +76,11 @@
     public static final ImmutableDmaapConsumerConfiguration CORRECT_DMAAP_CONSUMER_CONFIG = //
         new ImmutableDmaapConsumerConfiguration.Builder() //
             .endpointUrl(
-                "http://admin:admin@message-router.onap.svc.cluster.local:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12")
+                "http://dradmin:dradmin@localhost:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12")
             .timeoutMs(-1) //
-            .dmaapHostName("message-router.onap.svc.cluster.local") //
-            .dmaapUserName("admin") //
-            .dmaapUserPassword("admin") //
+            .dmaapHostName("localhost") //
+            .dmaapUserName("dradmin") //
+            .dmaapUserPassword("dradmin") //
             .dmaapTopicName("events/unauthenticated.VES_NOTIFICATION_OUTPUT") //
             .dmaapPortNumber(2222) //
             .dmaapContentType("application/json") //
@@ -97,7 +97,7 @@
 
     public static final ConsumerConfiguration CORRECT_CONSUMER_CONFIG = ImmutableConsumerConfiguration.builder() //
         .topicUrl(
-            "http://admin:admin@message-router.onap.svc.cluster.local:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12")
+            "http://dradmin:dradmin@localhost:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12")
         .trustStorePath("trustStorePath") //
         .trustStorePasswordPath("trustStorePasswordPath") //
         .keyStorePath("keyStorePath") //
@@ -107,15 +107,16 @@
 
     private static final PublisherConfiguration CORRECT_PUBLISHER_CONFIG = //
         ImmutablePublisherConfiguration.builder() //
-            .publishUrl("https://message-router.onap.svc.cluster.local:3907/publish/1") //
-            .logUrl("https://dmaap.example.com/feedlog/972").trustStorePath("trustStorePath") //
+            .publishUrl("https://localhost:3907/publish/1") //
+            .logUrl("https://localhost:3907/feedlog/1") //
+            .trustStorePath("trustStorePath") //
             .trustStorePasswordPath("trustStorePasswordPath") //
             .keyStorePath("keyStorePath") //
             .keyStorePasswordPath("keyStorePasswordPath") //
             .enableDmaapCertAuth(true) //
             .changeIdentifier("PM_MEAS_FILES") //
-            .userName("user") //
-            .passWord("password") //
+            .userName("CYE9fl40") //
+            .passWord("izBJD8nLjawq0HMG") //
             .build();
 
     private static final ImmutableFtpesConfig CORRECT_FTPES_CONFIGURATION = //
@@ -128,13 +129,14 @@
 
     private static final ImmutableDmaapPublisherConfiguration CORRECT_DMAAP_PUBLISHER_CONFIG = //
         new ImmutableDmaapPublisherConfiguration.Builder() //
-            .endpointUrl("https://message-router.onap.svc.cluster.local:3907/publish/1").dmaapTopicName("/publish/1") //
-            .dmaapUserPassword("password") //
+            .endpointUrl("https://localhost:3907/publish/1") //
+            .dmaapTopicName("/publish/1") //
+            .dmaapUserPassword("izBJD8nLjawq0HMG") //
             .dmaapPortNumber(3907) //
             .dmaapProtocol("https") //
             .dmaapContentType("application/octet-stream") //
-            .dmaapHostName("message-router.onap.svc.cluster.local") //
-            .dmaapUserName("user") //
+            .dmaapHostName("localhost") //
+            .dmaapUserName("CYE9fl40") //
             .trustStorePath("trustStorePath") //
             .trustStorePasswordPath("trustStorePasswordPath") //
             .keyStorePath("keyStorePath") //
@@ -256,7 +258,7 @@
 
     @Test
     public void whenPeriodicConfigRefreshNoEnvironmentVariables() {
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(AppConfig.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(AppConfig.class);
         Flux<AppConfig> task = appConfigUnderTest.createRefreshTask(context);
 
         StepVerifier //
@@ -268,8 +270,7 @@
     }
 
     @Test
-    public void whenPeriodicConfigRefreshNoConsul() {
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(AppConfig.class);
+    public void whenPeriodicConfigRefreshNoConsul() {    
         EnvProperties props = properties();
         doReturn(Mono.just(props)).when(appConfigUnderTest).getEnvironment(any(), any());
 
@@ -277,6 +278,7 @@
         Flux<JsonObject> err = Flux.error(new IOException());
         doReturn(err).when(cbsClient).updates(any(), any(), any());
 
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(AppConfig.class);
         Flux<AppConfig> task = appConfigUnderTest.createRefreshTask(context);
 
         StepVerifier //
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/ScheduleControllerTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/ScheduleControllerTest.java
index 558eaf0..345c411 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/ScheduleControllerTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/ScheduleControllerTest.java
@@ -62,7 +62,7 @@
 
         HttpHeaders httpHeaders = new HttpHeaders();
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduleController.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduleController.class);
         Mono<ResponseEntity<String>> response = scheduleControllerUnderTest.startTasks(httpHeaders);
 
         validateLogging(logAppender, "Start request");
@@ -80,10 +80,10 @@
 
         HttpHeaders httpHeaders = new HttpHeaders();
         // The following headers are set to create branch coverage in MappedDiagnosticContext:initializeTraceContext().
-        httpHeaders.set(MdcVariables.X_ONAP_REQUEST_ID, "Onap request ID");
-        httpHeaders.set(MdcVariables.X_INVOCATION_ID, "Invocation ID");
+        httpHeaders.set(MdcVariables.httpHeader(MdcVariables.REQUEST_ID), "Onap request ID");
+        httpHeaders.set(MdcVariables.httpHeader(MdcVariables.INVOCATION_ID), "Invocation ID");
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduleController.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduleController.class);
         Mono<ResponseEntity<String>> response = scheduleControllerUnderTest.startTasks(httpHeaders);
 
         validateLogging(logAppender, "Start request");
@@ -102,7 +102,7 @@
 
         HttpHeaders httpHeaders = new HttpHeaders();
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduleController.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduleController.class);
         Mono<ResponseEntity<String>> actualResponse = scheduleControllerUnderTest.stopTask(httpHeaders);
 
         validateLogging(logAppender, "Stop request");
@@ -115,11 +115,11 @@
     }
 
     private void validateLogging(ListAppender<ILoggingEvent> logAppender, String infoMessage) {
-        assertEquals(logAppender.list.get(0).getMarker().getName(), "ENTRY");
+        assertEquals("ENTRY", logAppender.list.get(0).getMarker().getName());
         assertNotNull(logAppender.list.get(0).getMDCPropertyMap().get("InvocationID"));
         assertNotNull(logAppender.list.get(0).getMDCPropertyMap().get("RequestID"));
         assertTrue("Info missing in log", logAppender.list.toString().contains("[INFO] " + infoMessage));
-        assertEquals(logAppender.list.get(1).getMarker().getName(), "EXIT");
+        assertEquals("EXIT", logAppender.list.get(1).getMarker().getName());
         logAppender.stop();
     }
 }
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/StatusControllerTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/StatusControllerTest.java
index 55c796a..998bb17 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/StatusControllerTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/controllers/StatusControllerTest.java
@@ -60,7 +60,7 @@
     public void heartbeat_success() {
         HttpHeaders httpHeaders = new HttpHeaders();
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(StatusController.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(StatusController.class);
         Mono<ResponseEntity<String>> result = controllerUnderTest.heartbeat(httpHeaders);
 
         validateLogging(logAppender);
@@ -89,11 +89,11 @@
     }
 
     private void validateLogging(ListAppender<ILoggingEvent> logAppender) {
-        assertEquals(logAppender.list.get(0).getMarker().getName(), "ENTRY");
+        assertEquals("ENTRY", logAppender.list.get(0).getMarker().getName());
         assertNotNull(logAppender.list.get(0).getMDCPropertyMap().get("InvocationID"));
         assertNotNull(logAppender.list.get(0).getMDCPropertyMap().get("RequestID"));
         assertTrue("Info missing in log", logAppender.list.toString().contains("[INFO] Heartbeat request"));
-        assertEquals(logAppender.list.get(1).getMarker().getName(), "EXIT");
+        assertEquals("EXIT", logAppender.list.get(1).getMarker().getName());
         logAppender.stop();
     }
 }
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/DmaapWebClientTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/DmaapWebClientTest.java
index 499b260..d4e060f 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/DmaapWebClientTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/DmaapWebClientTest.java
@@ -72,13 +72,13 @@
 
         when(clientResponseMock.statusCode()).thenReturn(HttpStatus.OK);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DmaapWebClient.class, true);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DmaapWebClient.class, true);
         Mono<ClientResponse> logResponse = dmaapWebClientUndetTest.logResponse(clientResponseMock);
 
         assertEquals(clientResponseMock, logResponse.block());
 
-        assertEquals(logAppender.list.get(0).getLevel(), Level.TRACE);
-        assertEquals(logAppender.list.get(0).getFormattedMessage(), "Response Status 200 OK");
+        assertEquals(Level.TRACE, logAppender.list.get(0).getLevel());
+        assertEquals("Response Status 200 OK", logAppender.list.get(0).getFormattedMessage());
 
         logAppender.stop();
     }
@@ -93,14 +93,14 @@
 
         DmaapWebClient dmaapWebClientUndetTest = new DmaapWebClient();
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DmaapWebClient.class, true);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DmaapWebClient.class, true);
         Mono<ClientRequest> logRequest = dmaapWebClientUndetTest.logRequest(clientRequesteMock);
 
         assertEquals(clientRequesteMock, logRequest.block());
 
-        assertEquals(logAppender.list.get(0).getLevel(), Level.TRACE);
+        assertEquals(Level.TRACE, logAppender.list.get(0).getLevel());
         assertEquals("Request: GET http://test", logAppender.list.get(0).getFormattedMessage());
-        assertEquals(logAppender.list.get(1).getLevel(), Level.TRACE);
+        assertEquals(Level.TRACE, logAppender.list.get(1).getLevel());
         assertEquals("HTTP request headers: [header:\"value\"]", logAppender.list.get(1).getFormattedMessage());
 
         logAppender.stop();
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/JsonMessageParserTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/JsonMessageParserTest.java
index cd18bfa..cf0cfec 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/JsonMessageParserTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/service/JsonMessageParserTest.java
@@ -203,7 +203,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).verifyComplete();
 
@@ -235,7 +235,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).verifyComplete();
 
@@ -320,7 +320,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectComplete().verify();
 
@@ -351,7 +351,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).verifyComplete();
 
@@ -377,7 +377,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).verifyComplete();
 
@@ -408,7 +408,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).verifyComplete();
 
@@ -441,7 +441,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).verifyComplete();
 
@@ -523,7 +523,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectComplete().verify();
 
@@ -542,7 +542,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectComplete().verify();
 
@@ -572,7 +572,7 @@
         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject())).when(jsonMessageParserUnderTest)
             .getJsonObjectFromAnArray(jsonElement);
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(JsonMessageParser.class);
         StepVerifier.create(jsonMessageParserUnderTest.getMessagesFromJson(Mono.just(jsonElement))).expectSubscription()
             .expectNextCount(0).expectComplete().verify();
 
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisherTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisherTest.java
index fb36917..4a4c4e8 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisherTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisherTest.java
@@ -100,7 +100,7 @@
     private static PublisherConfiguration publisherConfigurationMock = mock(PublisherConfiguration.class);
     private static Map<String, String> context = new HashMap<>();
     private static DataRouterPublisher publisherTaskUnderTestSpy;
-    private static final Counters counters = new Counters();
+    private Counters counters;
 
     @BeforeAll
     public static void setUp() {
@@ -123,12 +123,12 @@
             .changeIdentifier(CHANGE_IDENTIFIER) //
             .build(); //
         appConfig = mock(AppConfig.class);
-        publisherTaskUnderTestSpy = spy(new DataRouterPublisher(appConfig, counters));
     }
 
     @BeforeEach
     void setUpTest() {
-        counters.clear();
+        counters = new Counters();
+        publisherTaskUnderTestSpy = spy(new DataRouterPublisher(appConfig, counters));
     }
 
     @Test
@@ -185,7 +185,7 @@
     void whenPassedObjectFits_firstFailsWithExceptionThenSucceeds() throws Exception {
         prepareMocksForTests(new DatafileTaskException("Error"), HttpStatus.OK.value());
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DataRouterPublisher.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DataRouterPublisher.class);
         StepVerifier.create(publisherTaskUnderTestSpy.publishFile(filePublishInformation, 2, Duration.ofSeconds(0)))
             .expectNext(filePublishInformation) //
             .verifyComplete();
@@ -220,7 +220,7 @@
         prepareMocksForTests(null, Integer.valueOf(HttpStatus.BAD_GATEWAY.value()),
             Integer.valueOf((HttpStatus.BAD_GATEWAY.value())));
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DataRouterPublisher.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(DataRouterPublisher.class);
         StepVerifier.create(publisherTaskUnderTestSpy.publishFile(filePublishInformation, 1, Duration.ofSeconds(0)))
             .expectErrorMessage("Retries exhausted: 1/1") //
             .verify();
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollectorTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollectorTest.java
index 1ab97d4..2534f64 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollectorTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollectorTest.java
@@ -96,7 +96,7 @@
     private SftpClient sftpClientMock = mock(SftpClient.class);
     private final Map<String, String> contextMap = new HashMap<>();
 
-    private final Counters counters = new Counters();
+    private Counters counters;
 
     private MessageMetaData createMessageMetaData() {
         return ImmutableMessageMetaData.builder() //
@@ -153,7 +153,7 @@
 
     @BeforeEach
     void setUpTest() {
-        counters.clear();
+        counters = new Counters();
     }
 
     @Test
@@ -175,8 +175,8 @@
         verify(ftpsClientMock, times(1)).close();
         verifyNoMoreInteractions(ftpsClientMock);
 
-        assertEquals("collectedFiles should have been 1", counters.getNoOfCollectedFiles(), 1);
-        assertEquals("failedFtpAttempts should have been 0", counters.getNoOfFailedFtpAttempts(), 0);
+        assertEquals("collectedFiles should have been 1", 1, counters.getNoOfCollectedFiles());
+        assertEquals("failedFtpAttempts should have been 0", 0, counters.getNoOfFailedFtpAttempts());
     }
 
     @Test
@@ -205,7 +205,7 @@
         verify(sftpClientMock, times(2)).close();
         verifyNoMoreInteractions(sftpClientMock);
 
-        assertEquals("collectedFiles should have been 2", counters.getNoOfCollectedFiles(), 2);
+        assertEquals("collectedFiles should have been 2", 2, counters.getNoOfCollectedFiles());
     }
 
     @Test
@@ -223,8 +223,8 @@
 
         verify(ftpsClientMock, times(4)).collectFile(REMOTE_FILE_LOCATION, LOCAL_FILE_LOCATION);
 
-        assertEquals("collectedFiles should have been 0", counters.getNoOfCollectedFiles(), 0);
-        assertEquals("failedFtpAttempts should have been 4", counters.getNoOfFailedFtpAttempts(), 4);
+        assertEquals("collectedFiles should have been 0", 0, counters.getNoOfCollectedFiles());
+        assertEquals("failedFtpAttempts should have been 4", 4, counters.getNoOfFailedFtpAttempts());
     }
 
     @Test
@@ -242,8 +242,8 @@
 
         verify(ftpsClientMock, times(1)).collectFile(REMOTE_FILE_LOCATION, LOCAL_FILE_LOCATION);
 
-        assertEquals("collectedFiles should have been 0", counters.getNoOfCollectedFiles(), 0);
-        assertEquals("failedFtpAttempts should have been 1", counters.getNoOfFailedFtpAttempts(), 1);
+        assertEquals("collectedFiles should have been 0", 0, counters.getNoOfCollectedFiles());
+        assertEquals("failedFtpAttempts should have been 1", 1, counters.getNoOfFailedFtpAttempts());
     }
 
     @Test
@@ -264,7 +264,7 @@
 
         verify(ftpsClientMock, times(2)).collectFile(REMOTE_FILE_LOCATION, LOCAL_FILE_LOCATION);
 
-        assertEquals("collectedFiles should have been 1", counters.getNoOfCollectedFiles(), 1);
-        assertEquals("failedFtpAttempts should have been 1", counters.getNoOfFailedFtpAttempts(), 1);
+        assertEquals("collectedFiles should have been 1", 1, counters.getNoOfCollectedFiles());
+        assertEquals("failedFtpAttempts should have been 1", 1, counters.getNoOfFailedFtpAttempts());
     }
 }
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java
index a0096b7..c77f5fc 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java
@@ -290,7 +290,7 @@
         Flux<FileReadyMessage> fileReadyMessages = fileReadyMessageFlux(noOfEvents, noOfFilesPerEvent, true);
         doReturn(fileReadyMessages).when(consumerMock).getMessageRouterResponse();
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduledTasks.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduledTasks.class);
         testedObject.executeDatafileMainTask();
 
         await().untilAsserted(() -> assertEquals("currentNumberOfSubscriptions should have been 0", 0,
@@ -305,7 +305,7 @@
         MDC.setContextMap(contextMap);
         doReturn(Flux.error(new Exception("Failed"))).when(consumerMock).getMessageRouterResponse();
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduledTasks.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduledTasks.class);
         StepVerifier //
             .create(testedObject.createMainTask(contextMap)) //
             .expectSubscription() //
@@ -417,7 +417,7 @@
             .when(dataRouterMock) //
             .publishFile(notNull(), anyLong(), notNull());
 
-        ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduledTasks.class);
+        final ListAppender<ILoggingEvent> logAppender = LoggingUtils.getLogListAppender(ScheduledTasks.class);
         StepVerifier //
             .create(testedObject.createMainTask(contextMap)) //
             .expectSubscription() //
diff --git a/datafile-app-server/src/test/resources/datafile_endpoints_test.json b/datafile-app-server/src/test/resources/datafile_endpoints_test.json
index 0157c7d..8913dc4 100644
--- a/datafile-app-server/src/test/resources/datafile_endpoints_test.json
+++ b/datafile-app-server/src/test/resources/datafile_endpoints_test.json
@@ -14,22 +14,23 @@
       "PM_MEAS_FILES": {
         "type": "data_router",
         "dmaap_info": {
-          "username": "user",
-          "log_url": "https://dmaap.example.com/feedlog/972",
-          "publish_url": "https://message-router.onap.svc.cluster.local:3907/publish/1",
+          "username": "CYE9fl40",
           "location": "loc00",
-          "password": "password",
-          "publisher_id": "972.360gm"
+          "log_url": "https://localhost:3907/feedlog/1",
+          "publisher_id": "4.307dw",
+          "password": "izBJD8nLjawq0HMG",
+          "publish_url": "https://localhost:3907/publish/1"
         }
       }
     },
     "streams_subscribes": {
       "dmaap_subscriber": {
         "dmaap_info": {
-          "topic_url": "http://admin:admin@message-router.onap.svc.cluster.local:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+          "topic_url": "http://dradmin:dradmin@localhost:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
         },
         "type": "message_router"
       }
     }
   }
-}
\ No newline at end of file
+}
+
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
deleted file mode 100644
index 010e746..0000000
--- a/docker-compose/docker-compose.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-version: '3'
-services:
-  data-file-collector:
-    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server
-    command: >
-      --dmaap.dmaapConsumerConfiguration.dmaapHostName=<HOST-TO-SET-DMAAP-MR>
-      --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=3904
-      --dmaap.dmaapConsumerConfiguration.dmaapTopicName=/events/unauthenticated.VES_NOTIFICATION_OUTPUT
-      --dmaap.dmaapConsumerConfiguration.dmaapProtocol=http
-      --dmaap.dmaapConsumerConfiguration.dmaapUserName=admin
-      --dmaap.dmaapConsumerConfiguration.dmaapUserPassword=admin
-      --dmaap.dmaapConsumerConfiguration.dmaapContentType=application/json
-      --dmaap.dmaapConsumerConfiguration.consumerId=C12
-      --dmaap.dmaapConsumerConfiguration.consumerGroup=OpenDCAE-c12
-      --dmaap.dmaapConsumerConfiguration.timeoutMs=-1
-      --dmaap.dmaapConsumerConfiguration.message-limit=-1
-      --dmaap.dmaapProducerConfiguration.dmaapHostName=<HOST-TO-SET-DMAAP-DR>
-      --dmaap.dmaapProducerConfiguration.dmaapPortNumber=8443
-      --dmaap.dmaapProducerConfiguration.dmaapTopicName=publish
-      --dmaap.dmaapProducerConfiguration.dmaapProtocol=https
-      --dmaap.dmaapProducerConfiguration.dmaapUserName=dradmin
-      --dmaap.dmaapProducerConfiguration.dmaapUserPassword=dradmin
-      --dmaap.dmaapProducerConfiguration.dmaapContentType=application/octet-stream
-      --dmaap.ftpesConfig.keyCert=config/dfc.jks
-      --dmaap.ftpesConfig.keyPassword=secret
-      --dmaap.ftpesConfig.trustedCA=config/ftp.jks
-      --dmaap.ftpesConfig.trustedCAPassword=secret
-    entrypoint:
-    - java
-    - -Dspring.profiles.active=dev
-    - -jar
-    - /target/datafile-app-server.jar
-    ports:
-    - "8100:8100"
-    - "8433:8433"
-    restart: always
-
diff --git a/pom.xml b/pom.xml
index 34376f9..31d2df3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
 
   <groupId>org.onap.dcaegen2.collectors</groupId>
   <artifactId>datafile</artifactId>
-  <version>1.2.1-SNAPSHOT</version>
+  <version>1.2.2-SNAPSHOT</version>
 
   <name>dcaegen2-collectors.datafile</name>
   <description>datafile collector</description>
@@ -286,9 +286,6 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-deploy-plugin</artifactId>
-          <configuration>
-            <skip>true</skip>
-          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
diff --git a/releases/1.2.1.yaml b/releases/1.2.1.yaml
new file mode 100644
index 0000000..78e6e17
--- /dev/null
+++ b/releases/1.2.1.yaml
@@ -0,0 +1,4 @@
+distribution_type: 'maven'
+version: '1.2.1'
+project: 'dcaegen2-collectors-datafile'
+log_dir: 'dcaegen2-collectors-datafile-maven-stage-master/18/'
diff --git a/releases/1.2.2.yaml b/releases/1.2.2.yaml
new file mode 100644
index 0000000..ce5c10d
--- /dev/null
+++ b/releases/1.2.2.yaml
@@ -0,0 +1,4 @@
+distribution_type: 'maven'
+version: '1.2.2'
+project: 'dcaegen2-collectors-datafile'
+log_dir: 'dcaegen2-collectors-datafile-maven-stage-master/26/'
diff --git a/version.properties b/version.properties
index e8a442a..e562846 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
 major=1

 minor=2

-patch=1

+patch=2

 base_version=${major}.${minor}.${patch}

 release_version=${base_version}

 snapshot_version=${base_version}-SNAPSHOT