@Test
    void testSearcherConfigUpdate() throws IOException {
        File cfgDir = getCfgDir();
        copyFile(testDir + "handlers.cfg", cfgDir +  "/handlers.cfg");
        copyFile(testDir + "qr-search.cfg", cfgDir +  "/qr-search.cfg");
        copyFile(testDir + "qr-searchers.cfg", cfgDir +  "/qr-searchers.cfg");
        copyFile(testDir + "index-info.cfg", cfgDir +  "/index-info.cfg");
        copyFile(testDir + "schema-info.cfg", cfgDir +  "/schema-info.cfg");
        copyFile(testDir + "specialtokens.cfg", cfgDir +  "/specialtokens.cfg");
        copyFile(testDir + "three-searchers.cfg", cfgDir +  "/chains.cfg");
        copyFile(testDir + "container-http.cfg", cfgDir +  "/container-http.cfg");
        createComponentsConfig(testDir + "three-searchers.cfg", testDir + "handlers.cfg", cfgDir +  "/components.cfg");
        printFile(new File(cfgDir + "/int.cfg"), "intVal 16\n");
        printFile(new File(cfgDir + "/string.cfg"), "stringVal \"testSearcherConfigUpdate\"\n");

        HandlersConfigurerTestWrapper configurer = new HandlersConfigurerTestWrapper("dir:" + cfgDir);
        SearcherRegistry searchers = getSearchChainRegistryFrom(configurer).getSearcherRegistry();
        assertEquals(3, searchers.getComponentCount());

        IntSearcher intSearcher = (IntSearcher) searchers.getComponent(IntSearcher.class.getName());
        assertEquals(16, intSearcher.intConfig.intVal());
        StringSearcher stringSearcher = (StringSearcher) searchers.getComponent(StringSearcher.class.getName());
        DeclaredTestSearcher noConfigSearcher =
                (DeclaredTestSearcher) searchers.getComponent(DeclaredTestSearcher.class.getName());

        // Update int config for IntSearcher,
        printFile(new File(cfgDir + "/int.cfg"), "intVal 17\n");
        configurer.reloadConfig();

        // Registry is rebuilt
        assertNotEquals(searchers, getSearchChainRegistryFrom(configurer).getSearcherRegistry());
        searchers = getSearchChainRegistryFrom(configurer).getSearcherRegistry();
        assertEquals(3, searchers.getComponentCount());

        // Searcher with updated config is re-instantiated.
        IntSearcher intSearcher2 = (IntSearcher) searchers.getComponent(IntSearcher.class.getName());
        assertNotSame(intSearcher, intSearcher2);
        assertEquals(17, intSearcher2.intConfig.intVal());

        // Searchers with unchanged config (or that takes no config) are the same as before.
        Searcher s = searchers.getComponent(DeclaredTestSearcher.class.getName());
        assertSame(noConfigSearcher, s);
        s = searchers.getComponent(StringSearcher.class.getName());
        assertSame(stringSearcher, s);

        configurer.shutdown();
        cleanup(cfgDir);
    }
Verifies that only searchers with updated config are re-instantiated after a config update
that does not contain any bootstrap configs.
container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java