@Test
public void addSubscriptionAlreadyExist() throws Exception {

    try {
        subscriptionService.addSubscription(TestUtils.getDefaultSubscription(), TestUtils.DEFAULT_ALARM_ID);
        fail("Adding duplicate exception with success");
    } catch (DuplicateSubscriptionException ce) {
        assertEquals(ErrorCode.SUBSCRIPTION_DUPLICATE, ce.getErrorCode());
    }
}