+}
+
+func TestMatchEventType(t *testing.T) {
+ notificationUrl := "url"
+ subId := "sub1"
+ serviceUnderTest := NewEventService(nil)
+ subscription := eventsapi.EventSubscription{
+ Events: []eventsapi.CAPIFEvent{
+ eventsapi.CAPIFEventSERVICEAPIAVAILABLE,
+ },
+ NotificationDestination: common29122.Uri(notificationUrl),
+ }
+ serviceUnderTest.addSubscription(subId, subscription)
+ sub2 := eventsapi.EventSubscription{
+ Events: []eventsapi.CAPIFEvent{
+ eventsapi.CAPIFEventACCESSCONTROLPOLICYUNAVAILABLE,
+ },
+ NotificationDestination: common29122.Uri(notificationUrl),
+ }
+ serviceUnderTest.addSubscription("other", sub2)
+
+ event := eventsapi.EventNotification{
+ SubscriptionId: subId,
+ Events: eventsapi.CAPIFEventSERVICEAPIAVAILABLE,
+ }