aboutsummaryrefslogtreecommitdiffstats
path: root/appc-event-listener
diff options
context:
space:
mode:
Diffstat (limited to 'appc-event-listener')
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/demo/model/OutgoingMessage.java4
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestIncomingMessage.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/demo/model/OutgoingMessage.java b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/demo/model/OutgoingMessage.java
index 375dde55f..100d55bf2 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/demo/model/OutgoingMessage.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/demo/model/OutgoingMessage.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* ================================================================================
@@ -170,6 +170,8 @@ public class OutgoingMessage extends CommonMessage {
public void setResponse(Status newStatus) {
if(this.status == null){
this.status = new OutStatus();
+ }
+ if(newStatus == null) {
return;
}
diff --git a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestIncomingMessage.java b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestIncomingMessage.java
index fe3406a13..d8d0986ce 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestIncomingMessage.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestIncomingMessage.java
@@ -39,6 +39,8 @@ public class TestIncomingMessage {
public void testToOutgoing() {
String expected = "{\"Status\":{\"Value\":null,\"Code\":null}}";
assertEquals(expected, incomingMessage.toOutgoing(null));
+ expected = "{\"Status\":{\"Value\":\""+Status.ACCEPTED.getValue()+"\",\"Code\":\"100\"}}";
+ assertEquals(expected, incomingMessage.toOutgoing(Status.ACCEPTED));
}
}