@Test
public void updateSubscriptionFailIfTargetChange() throws Exception {

    Subscription subscription = TestUtils.getDefaultSubscription();
    subscription.setTarget("coucou");
    try {
        subscriptionService.updateSubscription(subscription, TestUtils.DEFAULT_ALARM_ID);
        fail("Update target of a subscription should throw an exception");
    } catch (CerebroException ce) {
        assertEquals(ErrorCode.SUBSCRIPTION_UPDATE_INVALID, ce.getErrorCode());
    }
}