[RICPLT-2523] Update setup flow | Add UTs..........
[ric-plt/e2mgr.git] / E2Manager / handlers / rmrmsghandlers / e2_term_init_notification_handler_test.go
index 5101eae..2cfc6f5 100644 (file)
@@ -66,6 +66,13 @@ func TestE2TermInitUnmarshalPayloadFailure(t *testing.T) {
        e2tInstancesManagerMock.AssertNotCalled(t, "AddE2TInstance")
 }
 
+func TestE2TermInitEmptyE2TAddress(t *testing.T) {
+       _, handler, _, _, _, e2tInstancesManagerMock := initRanLostConnectionTest(t)
+       notificationRequest := &models.NotificationRequest{RanName: RanName, Payload: []byte("{\"address\":\"\"}")}
+       handler.Handle(notificationRequest)
+       e2tInstancesManagerMock.AssertNotCalled(t, "GetE2TInstance")
+       e2tInstancesManagerMock.AssertNotCalled(t, "AddE2TInstance")
+}
 
 func TestE2TermInitGetE2TInstanceFailure(t *testing.T) {
        _, handler, _, _, _, e2tInstancesManagerMock := initRanLostConnectionTest(t)