FlowdockNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.FLOWDOCK; } @Inject  FlowdockNotificationService(SeyrenConfig seyrenConfig); protected  FlowdockNotificationService(SeyrenConfig seyrenConfig, String baseUrl); @Override void sendNotification(Check check, Subscription subscription, List<Alert> alerts); @Override boolean canHandle(SubscriptionType subscriptionType);  }
@Test public void notifcationServiceCanOnlyHandleFlowdockSubscription() { assertThat(notificationService.canHandle(SubscriptionType.FLOWDOCK), is(true)); for (SubscriptionType type : SubscriptionType.values()) { if (type == SubscriptionType.FLOWDOCK) { continue; } assertThat(notificationService.canHandle(type), is(false)); } }