IrcCatNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.IRCCAT; } @Inject  IrcCatNotificationService(SeyrenConfig seyrenConfig); @Override void sendNotification(Check check, Subscription subscription, List<Alert> alerts); @Override boolean canHandle(SubscriptionType subscriptionType);  }
@Test public void notifcationServiceCanOnlyHandleHubotSubscription() { assertThat(service.canHandle(SubscriptionType.IRCCAT), is(true)); for (SubscriptionType type : SubscriptionType.values()) { if (type == SubscriptionType.IRCCAT) { continue; } assertThat(service.canHandle(type), is(false)); } }