### Question:
JaxRsCdiExtension implements Extension { Optional<String> findNamedRouting(io.helidon.config.Config config, JaxRsApplication jaxRsApplication) { return config.get(jaxRsApplication.appClassName() + "." + RoutingName.CONFIG_KEY_NAME) .asString() .or(jaxRsApplication::routingName) .flatMap(it -> RoutingName.DEFAULT_NAME.equals(it) ? Optional.empty() : Optional.of(it)); }  List<JaxRsApplication> applicationsToRun(); void removeApplications(); void removeResourceClasses(); void addResourceClasses(List<Class<?>> resourceClasses); void addApplications(List<JaxRsApplication> applications); void addApplication(Application application); void addApplication(String contextRoot, Application application); String serviceName(); void addSyntheticApplication(List<Class<?>> resourceClasses);  }### Answer:
@Test void testRouting() { JaxRsApplication app = JaxRsApplication.create(TestApp.class); Optional<String> namedRouting = extension.findNamedRouting(EMPTY_CONFIG, app); assertThat(namedRouting, value(is("admin"))); }
@Test void testRoutingNone() { JaxRsApplication app = JaxRsApplication.builder() .application(TestApp.class) .routingName(RoutingName.DEFAULT_NAME) .build(); Optional<String> namedRouting = extension.findNamedRouting(EMPTY_CONFIG, app); assertThat(namedRouting, empty()); }
@Test void testRoutingOverrideByConfig() { JaxRsApplication app = JaxRsApplication.create(TestApp.class); Config config = Config .create(ConfigSources.create(Map.of(TestApp.class.getName() + "." + RoutingName.CONFIG_KEY_NAME, "config"))); Optional<String> namedRouting = extension.findNamedRouting(config, app); assertThat(namedRouting, value(is("config"))); config = Config .create(ConfigSources.create(Map.of(TestApp.class.getName() + "." + RoutingName.CONFIG_KEY_NAME, RoutingName.DEFAULT_NAME))); namedRouting = extension.findNamedRouting(config, app); assertThat(namedRouting, empty()); }