@BeforeEach
    public void setUp() {
        // Instantiate Name Rewriter
        RewritesConfig config = QueryRewriteSearcherTestUtils.createConfigObj(NAME_REWRITER_CONFIG_PATH);
        HashMap<String, File> fileList = new HashMap<>();
        fileList.put(NameRewriter.NAME_ENTITY_EXPAND_DICT, new File(NAME_ENTITY_EXPAND_DICT_PATH));
        NameRewriter nameRewriter = new NameRewriter(config, fileList);

        // Instantiate Misspell Rewriter
        MisspellRewriter misspellRewriter = new MisspellRewriter();

        // Create market search chain of two rewriters
        ArrayList<Searcher> searchers = new ArrayList<>();
        searchers.add(misspellRewriter);
        searchers.add(nameRewriter);
        Chain<Searcher> marketSearchChain = new Chain<>(US_MARKET_SEARCH_CHAIN, searchers);

        // Add market search chain to the registry
        SearchChainRegistry registry = new SearchChainRegistry();
        registry.register(marketSearchChain);

        // Instantiate Search Chain Dispatcher Searcher
        SearchChainDispatcherSearcher searchChainDispatcher = new SearchChainDispatcherSearcher();

        // Create a chain containing only the dispatcher
        Chain<Searcher> mainSearchChain = new Chain<>(searchChainDispatcher);
        Execution execution = new Execution(mainSearchChain, Execution.Context.createContextStub(registry));
        utils = new QueryRewriteSearcherTestUtils(execution);
    }
Load the QueryRewriteSearcher and prepare the
execution object
container-search/src/test/java/com/yahoo/search/query/rewrite/test/SearchChainDispatcherSearcherTestCase.java