aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy')
-rw-r--r--src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy b/src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy
index 44a28de..7c4dee6 100644
--- a/src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy
+++ b/src/test/groovy/org/onap/cps/temporal/controller/event/listener/kafka/EventFixtures.groovy
@@ -32,11 +32,14 @@ class EventFixtures {
static DateTimeFormatter isoTimestampFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
static String defaultEventType = 'org.onap.cps.data-updated-event'
+ static URI defaultEventSchema = new URI('urn:cps:org.onap.cps:data-updated-event-schema:v1')
static URI defaultEventSource = new URI('urn:cps:org.onap.cps')
static CpsDataUpdatedEvent buildEvent(final Map map) {
CpsDataUpdatedEvent event =
new CpsDataUpdatedEvent()
+ .withSchema(
+ map.eventSchema != null ? new URI(map.eventSchema.toString()) : defaultEventSchema)
.withId(
map.id != null ? map.id.toString() : UUID.randomUUID().toString())
.withType(