@Test
    void testChainsConfigUpdate() 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 + "chainsConfigUpdate_1.cfg", cfgDir +  "/chains.cfg");
        copyFile(testDir + "container-http.cfg", cfgDir +  "/container-http.cfg");
        createComponentsConfig(testDir + "chainsConfigUpdate_1.cfg", testDir + "handlers.cfg", cfgDir +  "/components.cfg");

        HandlersConfigurerTestWrapper configurer = new HandlersConfigurerTestWrapper("dir:" + cfgDir);

        SearchChainRegistry scReg = getSearchChainRegistryFrom(configurer);
        SearcherRegistry searchers = scReg.getSearcherRegistry();
        assertEquals(2, searchers.getComponentCount());
        assertTrue(searchers.getComponent(IntSearcher.class.getName()) instanceof IntSearcher);
        assertTrue(searchers.getComponent(StringSearcher.class.getName()) instanceof StringSearcher);
        assertNull(searchers.getComponent(ConfigurableSearcher.class.getName()));
        assertNull(searchers.getComponent(DeclaredTestSearcher.class.getName()));

        IntSearcher intSearcher = (IntSearcher) searchers.getComponent(IntSearcher.class.getName());

        // Update chains config
        copyFile(testDir + "chainsConfigUpdate_2.cfg", cfgDir +  "/chains.cfg");
        createComponentsConfig(testDir + "chainsConfigUpdate_2.cfg", testDir + "handlers.cfg", cfgDir +  "/components.cfg");
        configurer.reloadConfig();

        assertNotEquals(scReg, getSearchChainRegistryFrom(configurer));

        // In the new registry, the correct searchers are removed and added
        assertNotEquals(searchers, getSearchChainRegistryFrom(configurer).getSearcherRegistry());
        searchers = getSearchChainRegistryFrom(configurer).getSearcherRegistry();
        assertEquals(3, searchers.getComponentCount());
        assertSame(intSearcher, searchers.getComponent(IntSearcher.class.getName()));
        assertTrue(searchers.getComponent(ConfigurableSearcher.class.getName()) instanceof ConfigurableSearcher);
        assertTrue(searchers.getComponent(DeclaredTestSearcher.class.getName()) instanceof DeclaredTestSearcher);
        assertNull(searchers.getComponent(StringSearcher.class.getName()));
        configurer.shutdown();
        cleanup(cfgDir);
    }
Updates the chains config, while the searcher configs are unchanged.
Verifies that a new searcher that was not in the old config is instantiated,
and that a searcher that has been removed from the configuration is not in the new registry.
container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java