aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pnfsimulator/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocks/pnfsimulator/src/main')
-rw-r--r--test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageConstants.java3
-rw-r--r--test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java11
2 files changed, 9 insertions, 5 deletions
diff --git a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageConstants.java b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageConstants.java
index b49c1ea1d..5805a88c7 100644
--- a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageConstants.java
+++ b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageConstants.java
@@ -17,11 +17,12 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
+
package org.onap.pnfsimulator.message;
public final class MessageConstants {
+ public static final String EVENT = "event";
public static final String DOMAIN = "domain";
public static final String EVENT_ID = "eventId";
public static final String EVENT_TYPE = "eventType";
diff --git a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java
index 163d4e62d..94f5fc167 100644
--- a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java
+++ b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java
@@ -35,13 +35,12 @@ import static org.onap.pnfsimulator.message.MessageConstants.PRIORITY;
import static org.onap.pnfsimulator.message.MessageConstants.SEQUENCE;
import static org.onap.pnfsimulator.message.MessageConstants.START_EPOCH_MICROSEC;
import static org.onap.pnfsimulator.message.MessageConstants.VERSION;
+import static org.onap.pnfsimulator.message.MessageConstants.EVENT;
import java.util.Map;
import java.util.UUID;
import com.google.common.base.Preconditions;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import org.json.JSONObject;
public class MessageProvider {
@@ -72,8 +71,11 @@ public class MessageProvider {
}
});
- root.put(COMMON_EVENT_HEADER, commonEventHeader);
- root.put(OTHER_FIELDS, otherFields);
+ JSONObject event = new JSONObject();
+ event.put(COMMON_EVENT_HEADER, commonEventHeader);
+ event.put(OTHER_FIELDS, otherFields);
+
+ root.put(EVENT, event);
return root;
}
@@ -91,6 +93,7 @@ public class MessageProvider {
commonEventHeader.put(START_EPOCH_MICROSEC, timestamp);
commonEventHeader.put(INTERNAL_HEADER_FIELDS, new JSONObject());
commonEventHeader.put(VERSION, 3);
+ commonEventHeader.put("functionalRole", "test_rola");
return commonEventHeader;
}