@Test
public void updateDisableLastSubscriptionAndDisableAlarmOK() throws Exception {

    Alarm alarm = TestUtils.getDefaultAlarm();
    Subscription subscription = alarm.getSubscriptions().get(0);
    subscription.setEnabled(false);
    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();
        }
    }));
}