@Test
public void updateSubscriptionFailIfNoDayToSendAlert() throws Exception {

    Subscription subscription = TestUtils.getDefaultSubscription();
    subscription.setMo(false);
    subscription.setTu(false);
    subscription.setWe(false);
    subscription.setTh(false);
    subscription.setFr(false);
    subscription.setSa(false);
    subscription.setSu(false);
    try {
        subscriptionService.updateSubscription(subscription, TestUtils.DEFAULT_ALARM_ID);
        fail("Update a subscription set no alerting day should throw an exception");
    } catch (CerebroException ce) {
        assertEquals(ErrorCode.SUBSCRIPTION_INVALID, ce.getErrorCode());
    }
}