+func TestSuccessfulUpdateNodebConnectivityState(t *testing.T) {
+ rnibDataService, _, writerMock := setupRnibDataServiceTest(t)
+ event := "event"
+
+ nodebInfo := &entities.NodebInfo{}
+ writerMock.On("UpdateNodebConnectivityState", nodebInfo, CHANNEL_NAME, event).Return(nil)
+
+ rnibDataService.UpdateNodebConnectivityState(nodebInfo, event)
+ writerMock.AssertNumberOfCalls(t, "UpdateNodebConnectivityState", 1)
+}
+
+func TestConnFailureUpdateNodebConnectivityState(t *testing.T) {
+ rnibDataService, _, writerMock := setupRnibDataServiceTest(t)
+ event := "event"
+
+ nodebInfo := &entities.NodebInfo{}
+ mockErr := &common.InternalError{Err: &net.OpError{Err: fmt.Errorf("connection error")}}
+ writerMock.On("UpdateNodebConnectivityState", nodebInfo, CHANNEL_NAME, event).Return(mockErr)
+
+ rnibDataService.UpdateNodebConnectivityState(nodebInfo, event)
+ writerMock.AssertNumberOfCalls(t, "UpdateNodebConnectivityState", 3)
+}
+