/** * This test makes sure that the reader stores its configuration. */ @Test public void testConfigurationConservation() { final Configuration configuration = new Configuration(); configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES, "50"); configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_DELAY_NS, "42"); configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS, "21"); final TimeReader tr = new TimeReader(configuration, new AnalysisController()); Assert.assertEquals(42, tr.getCurrentConfiguration().getLongProperty(TimeReader.CONFIG_PROPERTY_NAME_DELAY_NS)); Assert.assertEquals(21, tr.getCurrentConfiguration().getLongProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS)); Assert.assertEquals(50, tr.getCurrentConfiguration().getLongProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES)); }