diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt
index 4586d30..543d7dc 100644
--- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt
+++ b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt
@@ -27,11 +27,11 @@
     private val requiredFieldDescriptors = listOf(
             "version",
             "eventName",
-            // "domain", TODO to be restored back when GPB schema will include default value
+            "domain",
             "eventId",
             "sourceName",
             "reportingEntityName",
-            // "priority", TODO to be restored back when GPB schema will include default value
+            "priority",
             "startEpochMicrosec",
             "lastEpochMicrosec",
             "sequence")
diff --git a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidatorTest.kt b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidatorTest.kt
index a2a26b3..eb8971c 100644
--- a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidatorTest.kt
+++ b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidatorTest.kt
@@ -49,18 +49,7 @@
         val cut = MessageValidator
 
         on("ves hv message including header with fully initialized fields") {
-            val commonHeader = newBuilder()
-                    .setVersion("1.9")
-                    .setEventName("Sample event name")
-                    .setDomain(Domain.HVRANMEAS)
-                    .setEventId("Sample event Id")
-                    .setSourceName("Sample Source")
-                    .setReportingEntityName(ByteString.copyFromUtf8("Sample byte String"))
-                    .setPriority(Priority.MEDIUM)
-                    .setStartEpochMicrosec(120034455)
-                    .setLastEpochMicrosec(120034459)
-                    .setSequence(2)
-                    .build()
+            val commonHeader = createInitializedHeaderBuilder().build()
 
             it("should accept message with fully initialized message header") {
                 val vesMessage = VesMessage(commonHeader, vesMessageBytes(commonHeader))
@@ -68,9 +57,9 @@
             }
 
             Domain.values()
-                    .filter { it != Domain.UNRECOGNIZED }
-                    .forEach {domain ->
-                        it("should accept message with $domain domain"){
+                    .filter { (it != Domain.UNRECOGNIZED && it != Domain.DOMAIN_UNDEFINED) }
+                    .forEach { domain ->
+                        it("should accept message with $domain domain") {
                             val header = newBuilder(commonHeader).setDomain(domain).build()
                             val vesMessage = VesMessage(header, vesMessageBytes(header))
                             assertThat(cut.isValid(vesMessage))
@@ -87,6 +76,45 @@
         }
 
 
+        val domainTestCases = mapOf(
+                Domain.DOMAIN_UNDEFINED to false,
+                Domain.FAULT to true
+        )
+
+        domainTestCases.forEach { value, expectedResult ->
+            on("ves hv message including header with domain $value") {
+                val commonEventHeader = createInitializedHeaderBuilder()
+                        .setDomain(value)
+                        .build()
+                val vesMessage = VesMessage(commonEventHeader, vesMessageBytes(commonEventHeader))
+
+                it("should resolve validation result") {
+                    assertThat(cut.isValid(vesMessage)).describedAs("message validation results")
+                            .isEqualTo(expectedResult)
+                }
+            }
+        }
+
+        val priorityTestCases = mapOf(
+                Priority.PRIORITY_UNDEFINED to false,
+                Priority.HIGH to true
+        )
+
+        priorityTestCases.forEach { value, expectedResult ->
+            on("ves hv message including header with priority $value") {
+                val commonEventHeader = createInitializedHeaderBuilder()
+                        .setPriority(value)
+                        .build()
+                val vesMessage = VesMessage(commonEventHeader, vesMessageBytes(commonEventHeader))
+
+                it("should resolve validation result") {
+                    assertThat(cut.isValid(vesMessage)).describedAs("message validation results")
+                            .isEqualTo(expectedResult)
+                }
+            }
+        }
+
+
         on("ves hv message including header with not initialized fields") {
             val commonHeader = newBuilder()
                     .setVersion("1.9")
@@ -106,4 +134,17 @@
             }
         }
     }
-})
\ No newline at end of file
+})
+
+private fun createInitializedHeaderBuilder(): CommonEventHeader.Builder =
+        newBuilder()
+                .setVersion("1.9")
+                .setEventName("Sample event name")
+                .setDomain(Domain.HVRANMEAS)
+                .setEventId("Sample event Id")
+                .setSourceName("Sample Source")
+                .setReportingEntityName(ByteString.copyFromUtf8("Sample byte String"))
+                .setPriority(Priority.MEDIUM)
+                .setStartEpochMicrosec(120034455)
+                .setLastEpochMicrosec(120034459)
+                .setSequence(2)
\ No newline at end of file
diff --git a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt
index 808a6fc..f4c527a 100644
--- a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt
+++ b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt
@@ -68,11 +68,11 @@
                         assertEquals("kafka:9093", it.kafkaBootstrapServers)
 
                         val route1 = it.routing.routes[0]
-                        assertEquals(Domain.HEARTBEAT, route1.domain)
+                        assertEquals(Domain.FAULT, route1.domain)
                         assertEquals("test-topic-1", route1.targetTopic)
 
                         val route2 = it.routing.routes[1]
-                        assertEquals(Domain.MEASUREMENTS_FOR_VF_SCALING, route2.domain)
+                        assertEquals(Domain.HEARTBEAT, route2.domain)
                         assertEquals("test-topic-2", route2.targetTopic)
 
                     }.verifyComplete()
diff --git a/hv-collector-domain/src/main/proto/VesEvent-v5.proto b/hv-collector-domain/src/main/proto/VesEvent-v5.proto
index 022cce4..340133b 100644
--- a/hv-collector-domain/src/main/proto/VesEvent-v5.proto
+++ b/hv-collector-domain/src/main/proto/VesEvent-v5.proto
@@ -30,27 +30,29 @@
   message CommonEventHeader {
     string version = 1; // required, "version of the event header"
     enum Domain {
-      FAULT = 0;
-      HEARTBEAT = 1;
-      MEASUREMENTS_FOR_VF_SCALING = 2;
-      MOBILE_FLOW = 3;
-      SIP_SIGNALING = 4;
-      STATE_CHANGE = 5;
-      SYSLOG = 6;
-      THRESHOLD_CROSSING_ALERT = 7;
-      VOICE_QUALITY = 8;
-      OTHER = 9;
-      HVRANMEAS = 10;
+      DOMAIN_UNDEFINED = 0;
+      FAULT = 1;
+      HEARTBEAT = 2;
+      MEASUREMENTS_FOR_VF_SCALING = 3;
+      MOBILE_FLOW = 4;
+      SIP_SIGNALING = 5;
+      STATE_CHANGE = 6;
+      SYSLOG = 7;
+      THRESHOLD_CROSSING_ALERT = 8;
+      VOICE_QUALITY = 9;
+      OTHER = 10;
+      HVRANMEAS = 11;
     }
     Domain domain = 2; // required, "the eventing domain associated with the event" [map to string]
 
     uint32 sequence = 3; // required, "ordering of events communicated by an event source instance or 0 if not needed"
 
     enum Priority {
-      HIGH = 0;
-      MEDIUM = 1;
-      NORMAL = 2;
-      LOW = 3;
+      PRIORITY_UNDEFINED = 0;
+      HIGH = 1;
+      MEDIUM = 2;
+      NORMAL = 3;
+      LOW = 4;
     }
     Priority priority = 4; // required, "processing priority"
 
