diff options
Diffstat (limited to 'test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java')
-rw-r--r-- | test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/message/MessageProvider.java | 9 |
1 files changed, 5 insertions, 4 deletions
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 e3b2b9cf0..7c3bf9ef8 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 @@ -22,8 +22,9 @@ package org.onap.pnfsimulator.message; import static org.onap.pnfsimulator.message.MessageConstants.COMMON_EVENT_HEADER; import static org.onap.pnfsimulator.message.MessageConstants.EVENT; -import static org.onap.pnfsimulator.message.MessageConstants.OTHER_FIELDS; import static org.onap.pnfsimulator.message.MessageConstants.PNF_PREFIX; +import static org.onap.pnfsimulator.message.MessageConstants.PNF_REGISTRATION_FIELDS; + import java.util.Map; import org.json.JSONObject; @@ -38,12 +39,12 @@ public class MessageProvider { Map<String, Object> paramsMap = params.toMap(); JSONObject root = new JSONObject(); JSONObject commonEventHeader = JSONObjectFactory.generateConstantCommonEventHeader(); - JSONObject otherFields = JSONObjectFactory.generateConstantOtherFields(); + JSONObject pnfRegistrationFields = JSONObjectFactory.generatePnfRegistrationFields(); paramsMap.forEach((key, value) -> { if (key.startsWith(PNF_PREFIX)) { - otherFields.put(key, value); + pnfRegistrationFields.put(key.substring(PNF_PREFIX.length()), value); } else { commonEventHeader.put(key, value); } @@ -51,7 +52,7 @@ public class MessageProvider { JSONObject event = new JSONObject(); event.put(COMMON_EVENT_HEADER, commonEventHeader); - event.put(OTHER_FIELDS, otherFields); + event.put(PNF_REGISTRATION_FIELDS, pnfRegistrationFields); root.put(EVENT, event); return root; } |