ModuleContext { public Optional<String> property(String key) { propertyValidator.usedProperties.add(key); return propertyManager.property(key); } ModuleContext(LogManager logManager); BackgroundTaskExecutor backgroundTask(); final void route(HTTPMethod method, String path, Controller controller, boolean skipInterceptor); T config(Class<T> configClass, @Nullable String name); T bind(Type type, @Nullable String name, T instance); void validate(); Optional<String> property(String key); final LogManager logManager; final List<Task> startupHook; final ShutdownHook shutdownHook; final BeanFactory beanFactory; final PropertyManager propertyManager; final StatCollector collector; final HTTPServer httpServer; final ServiceRegistry serviceRegistry; final BeanClassValidator beanClassValidator; }
@Test void property() { moduleContext.property("app.key"); assertThat(moduleContext.propertyValidator.usedProperties).contains("app.key"); }