summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandra Maciaga <aleksandra.maciaga@nokia.com>2020-04-21 13:39:45 +0200
committerAleksandra Maciaga <aleksandra.maciaga@nokia.com>2020-04-21 13:39:45 +0200
commit53565326843c38bcfd068875ac09d494cf17bd31 (patch)
tree3938340f828eac81b6508024b97dff5d8a74e574
parent7cbfea528e91a69ed7b67433b6d0359dae27658e (diff)
Fix sonar issue NetconfMessageListenerTest
Tests should include assertions A test case without assertions ensures only that no exceptions are thrown. Beyond basic runnability, it ensures nothing about the behavior of the code under test. Issue-ID: INT-1517 Signed-off-by: Aleksandra Maciaga <aleksandra.maciaga@nokia.com> Change-Id: I0f60482a6db2e24b23630c88bf13264c4d6fbbd6
-rw-r--r--netconfsimulator/src/test/java/org/onap/netconfsimulator/websocket/message/NetconfMessageListenerTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/netconfsimulator/src/test/java/org/onap/netconfsimulator/websocket/message/NetconfMessageListenerTest.java b/netconfsimulator/src/test/java/org/onap/netconfsimulator/websocket/message/NetconfMessageListenerTest.java
index bb040d1..c6e58c9 100644
--- a/netconfsimulator/src/test/java/org/onap/netconfsimulator/websocket/message/NetconfMessageListenerTest.java
+++ b/netconfsimulator/src/test/java/org/onap/netconfsimulator/websocket/message/NetconfMessageListenerTest.java
@@ -69,5 +69,7 @@ class NetconfMessageListenerTest {
doThrow(new EncodeException("","")).when(remoteEndpoint).sendObject(any(KafkaMessage.class));
netconfMessageListener.onMessage(KAFKA_RECORD);
+
+ verify(remoteEndpoint).sendObject(any(KafkaMessage.class));
}
}