diff options
author | JoeOLeary <joseph.o.leary@est.tech> | 2019-03-01 14:09:52 +0000 |
---|---|---|
committer | JoeOLeary <joseph.o.leary@est.tech> | 2019-03-01 14:09:52 +0000 |
commit | e5013912e5e1f62cd4ae9ee77fa765ed664c7d2f (patch) | |
tree | 8b99b18baf0895f7be690833129e2d07f1bbfc83 /src/test/java/utils | |
parent | b1fee35cd69ff8019c9deb38b482f24aa20a2ddd (diff) |
Update DataRouter Subscriber
*Update metadata header key to match new datarouter specification
*Update subscriber to be a privileged subscriber
*Update subscriber to improve logging & remove sonar smells
*Update delivery end point to match datarouter specification
*Update event to include the publish id provided by datarouter
*Add datarouter event processed utility
Issue-ID: DCAEGEN2-1038
Change-Id: Iafce544f31f888de53547de8b280faebd8075d4c
Signed-off-by: JoeOLeary <joseph.o.leary@est.tech>
Diffstat (limited to 'src/test/java/utils')
-rw-r--r-- | src/test/java/utils/EventUtils.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/test/java/utils/EventUtils.java b/src/test/java/utils/EventUtils.java index 90317c2..a6b131c 100644 --- a/src/test/java/utils/EventUtils.java +++ b/src/test/java/utils/EventUtils.java @@ -75,11 +75,26 @@ public class EventUtils { } /** + * Makes an event with a mock http server exchange, empty mdc and publish identity * @param body body for the event. * @param eventMetadata metadata for the event. * @return event with mock HttpServerExchange */ public static Event makeMockEvent(String body, EventMetadata eventMetadata) { - return new Event(mock(HttpServerExchange.class, RETURNS_DEEP_STUBS), body, eventMetadata, new HashMap<>()); + return new Event(mock(HttpServerExchange.class, RETURNS_DEEP_STUBS), body, eventMetadata, new HashMap<>(), ""); } + + + /** + * Makes an event with a mock http server exchange and empty mdc + * @param body body for the event. + * @param eventMetadata metadata for the event. + * @return event with mock HttpServerExchange + */ + public static Event makeMockEvent(String body, EventMetadata eventMetadata, String publishIdentity) { + HttpServerExchange mockHttpServerExchange = mock(HttpServerExchange.class, RETURNS_DEEP_STUBS); + return new Event(mockHttpServerExchange, body, eventMetadata, new HashMap<>(), publishIdentity); + } + + } |