### Question:
StartupInfo extends AbstractLifecycleListener { void logConfiguration(ConfigurationRegistry configurationRegistry, Logger logger) { final String serviceName = configurationRegistry.getConfig(CoreConfiguration.class).getServiceName(); logger.info("Starting Elastic APM {} as {} on {}", elasticApmVersion, serviceName, getJvmAndOsVersionString()); for (List<ConfigurationOption<?>> options : configurationRegistry.getConfigurationOptionsByCategory().values()) { for (ConfigurationOption<?> option : options) { if (!option.isDefault()) { logConfigWithNonDefaultValue(logger, option); } } } if (configurationRegistry.getConfig(StacktraceConfiguration.class).getApplicationPackages().isEmpty()) { logger.warn("To enable all features and decrease startup time, please configure {}", StacktraceConfiguration.APPLICATION_PACKAGES); } } StartupInfo(); @Override void init(ElasticApmTracer tracer);  }### Answer:
@Test void testLogDeprecatedKey() throws Exception { configurationRegistry.save("test_alias", "0.5", SimpleSource.NAME); startupInfo.logConfiguration(configurationRegistry, logger); verify(logger).warn("Detected usage of an old configuration key: '{}'. Please use '{}' instead.", "test_alias", "test"); }
@Test void testLogDeprecationWarningWhenNotSpecifyingTimeUnit() throws Exception { assertThat(config.duration.get().getMillis()).isEqualTo(1); assertThat(config.duration.getValueAsString()).isEqualTo("1"); startupInfo.logConfiguration(configurationRegistry, logger); verify(logger).warn("DEPRECATION WARNING: {}: '{}' (source: {}) is not using a time unit. Please use one of 'ms', 's' or 'm'.", "duration", "1", SimpleSource.NAME); }