@Modified
    public void modified(ComponentContext context) {
        if (context == null) {
            log.info("No component configuration");
            return;
        }

        Dictionary<?, ?> properties = context.getProperties();
        int newPollFrequency = getNewPollFrequency(properties, alarmPollFrequencySeconds);
        if (newPollFrequency != alarmPollFrequencySeconds) {
            alarmPollFrequencySeconds = newPollFrequency;
            //stops the old scheduled task
            scheduledTask.cancel(true);
            //schedules new task at the new polling rate
            scheduledTask = schedulePolling();
        }
    }
@Test
    public void modified() throws Exception {
        provider.modified(null);
        assertEquals("Incorrect polling frequency", 1, provider.alarmPollFrequencySeconds);
        provider.activate(null);
        provider.modified(context);
        assertEquals("Incorrect polling frequency", 1, provider.alarmPollFrequencySeconds);
    }