Update project and dependencies

* Changed version from 4.0.0-SNAPSHOT to 1.1.0-SNAPSHOT as per Vijay
  suggestion
* Updated Reactor to BOM Californium-SR2
* Updated mockito-kotlin to 2.0.0
* Introduced some fixes to support OpenJDK 11 compilation

Change-Id: Ib25979ef50c7241a019bf98efd9759e0b8792d58
Issue-ID: DCAEGEN2-961
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
diff --git a/hv-collector-ves-message-generator/pom.xml b/hv-collector-ves-message-generator/pom.xml
index 87728f6..dae42e2 100644
--- a/hv-collector-ves-message-generator/pom.xml
+++ b/hv-collector-ves-message-generator/pom.xml
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>ves-hv-collector</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImpl.kt b/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImpl.kt
index cc1d16f..fa39ed1 100644
--- a/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImpl.kt
+++ b/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImpl.kt
@@ -31,9 +31,8 @@
 import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageType.INVALID_WIRE_FRAME
 import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageType.TOO_BIG_PAYLOAD
 import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageType.VALID
-import org.onap.ves.VesEventOuterClass.VesEvent
 import org.onap.ves.VesEventOuterClass.CommonEventHeader
-
+import org.onap.ves.VesEventOuterClass.VesEvent
 import reactor.core.publisher.Flux
 import reactor.core.publisher.Mono
 import java.nio.charset.Charset
@@ -54,10 +53,17 @@
     private fun createMessageFlux(parameters: MessageParameters): Flux<WireFrameMessage> =
             Mono.fromCallable { createMessage(parameters.commonEventHeader, parameters.messageType) }
                     .let {
-                        if (parameters.amount < 0)
-                            it.repeat()
-                        else
-                            it.repeat(parameters.amount)
+                        when {
+                            parameters.amount < 0 ->
+                                // repeat forever
+                                it.repeat()
+                            parameters.amount == 0L ->
+                                // do not generate any message
+                                Flux.empty()
+                            else ->
+                                // send original message and additional amount-1 messages
+                                it.repeat(parameters.amount - 1)
+                        }
                     }
 
     private fun createMessage(commonEventHeader: CommonEventHeader, messageType: MessageType): WireFrameMessage =
diff --git a/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt b/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt
index ee76b78..e2aec7d 100644
--- a/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt
+++ b/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt
@@ -50,6 +50,7 @@
         val maxPayloadSizeBytes = 1024
         val generator = MessageGeneratorImpl(PayloadGenerator(), maxPayloadSizeBytes)
         given("single message parameters") {
+
             on("messages amount not specified in parameters") {
                 it("should create infinite flux") {
                     val limit = 1000L
@@ -64,6 +65,20 @@
                             .verifyComplete()
                 }
             }
+
+            on("messages amount = 0 specified in parameters") {
+                it("should create empty message flux") {
+                    generator
+                            .createMessageFlux(listOf(MessageParameters(
+                                    commonHeader(PERF3GPP),
+                                    MessageType.VALID,
+                                    0
+                            )))
+                            .test()
+                            .verifyComplete()
+                }
+            }
+
             on("messages amount specified in parameters") {
                 it("should create message flux of specified size") {
                     generator
@@ -77,6 +92,7 @@
                             .verifyComplete()
                 }
             }
+
             on("message type requesting valid message") {
                 it("should create flux of valid messages with given domain") {
                     generator
@@ -94,6 +110,7 @@
                             .verifyComplete()
                 }
             }
+
             on("message type requesting too big payload") {
                 it("should create flux of messages with given domain and payload exceeding threshold") {
 
@@ -112,6 +129,7 @@
                             .verifyComplete()
                 }
             }
+
             on("message type requesting invalid GPB data ") {
                 it("should create flux of messages with invalid payload") {
                     generator
@@ -130,6 +148,7 @@
                             .verifyComplete()
                 }
             }
+
             on("message type requesting invalid wire frame ") {
                 it("should create flux of messages with invalid version") {
                     generator
@@ -148,6 +167,7 @@
                             .verifyComplete()
                 }
             }
+
             on("message type requesting fixed payload") {
                 it("should create flux of valid messages with fixed payload") {
                     generator