@Test
public void updateSubscriptionEnableAlarm() throws Exception {

    // ****
    // Init, set repo to return a fully disabled alarm
    Alarm disabledAlarm = TestUtils.getDefaultAlarm();
    disabledAlarm.getSubscriptions().get(0).setEnabled(false);
    when(seyrenRepository.getAlarm(TestUtils.DEFAULT_ALARM_ID)).thenReturn(disabledAlarm);
    // ****
    Alarm alarm = TestUtils.getDefaultAlarm();
    Subscription subscription = alarm.getSubscriptions().get(0);
    subscription.setEnabled(true);
    subscriptionService.updateSubscription(subscription, TestUtils.DEFAULT_ALARM_ID);
    verify(seyrenRepository).updateSubscription(subscription, TestUtils.DEFAULT_ALARM_ID);
    verify(seyrenRepository).updateAlarm(argThat(new ArgumentMatcher<Alarm>() {
        @Override
        public boolean matches(Object argument) {
            Alarm argAlarm = (Alarm) argument;
            return argAlarm.getId().equals(alarm.getId()) && argAlarm.isEnabled();
        }
    }));
}