summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java
index 0d65231d..01bd3cf2 100644
--- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java
+++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java
@@ -19,4 +19,16 @@ public class TestSdncJsonDmaapConsumer {
SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer();
consumer.processMsg(null);
}
+
+ @Test(expected = InvalidMessageException.class)
+ public void testProcessMsgNullFieldMap_shouldThrowException() throws Exception {
+ SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer();
+
+ String msg = "{\n" +
+ " \"input\" : { \n" +
+ " }\n" +
+ "}";
+
+ consumer.processMsg(msg);
+ }
}