+
+ // Un match apiId
+ otherApiIds := []string{"otherApiId"}
+ (*serviceUnderTest.subscriptions[subId].EventFilters)[0].ApiIds = &otherApiIds
+ matchingSubs = serviceUnderTest.getMatchingSubs(event)
+ assert.Len(t, matchingSubs, 0)
+
+ // Un match invokerId
+ otherInvokerIds := []string{"otherInvokerId"}
+ (*serviceUnderTest.subscriptions[subId].EventFilters)[0].ApiIds = nil
+ (*serviceUnderTest.subscriptions[subId].EventFilters)[0].ApiInvokerIds = &otherInvokerIds
+ matchingSubs = serviceUnderTest.getMatchingSubs(event)
+ assert.Len(t, matchingSubs, 0)
+
+ // Un match aefId
+ otherAefIds := []string{"otherAefId"}
+ (*serviceUnderTest.subscriptions[subId].EventFilters)[0].ApiInvokerIds = nil
+ (*serviceUnderTest.subscriptions[subId].EventFilters)[0].AefIds = &otherAefIds
+ matchingSubs = serviceUnderTest.getMatchingSubs(event)
+ assert.Len(t, matchingSubs, 0)
+
+ // Match with empty subscription filter id list
+ (*serviceUnderTest.subscriptions[subId].EventFilters)[0].AefIds = &[]string{}
+ matchingSubs = serviceUnderTest.getMatchingSubs(event)
+ assert.Len(t, matchingSubs, 1)
+
+ // Match with empty event id list
+ event.EventDetail.ApiIds = nil
+ event.EventDetail.ApiInvokerIds = nil
+ event.EventDetail.ServiceAPIDescriptions = &[]publishserviceapi.ServiceAPIDescription{}
+ matchingSubs = serviceUnderTest.getMatchingSubs(event)
+ assert.Len(t, matchingSubs, 1)