ConfigurationService implements ManagedService { @SuppressWarnings("unchecked") @Override public void updated(Dictionary dict) throws ConfigurationException { if (dict != null) { unsubscriptionGracePeriod = (Integer) dict.get(UNSUBSCRIPTION_GRACE_PERIOD); if (unsubscriptionGracePeriod == null) { throw new ConfigurationException(UNSUBSCRIPTION_GRACE_PERIOD, "property not provided"); } } } private  ConfigurationService(); static ConfigurationService getInstance(); @SuppressWarnings("unchecked") @Override void updated(Dictionary dict); int getTimerSleepTime(); int getUnSubscriptionGracePeriod(); static final String PID; static final String UNSUBSCRIPTION_GRACE_PERIOD; }
@SuppressWarnings("unchecked") @Test(expectedExceptions=ConfigurationException.class,dependsOnMethods="testDefaults") public void testUpdatedMissingGracePeriod() throws Exception { configService.updated(dict); }