private Result doSearch(URI uri, long connectedAtMillis, long nowMillis) {
        SocketAddress remoteAddress = mock(SocketAddress.class);
        Version version = Version.HTTP_1_1;
        Method method = Method.GET;
        CurrentContainer container = mock(CurrentContainer.class);
        when(container.newReference(any())).thenReturn(mock(Container.class));
        when(container.newReference(any(URI.class), any(Object.class))).thenReturn(mock(Container.class));
        final com.yahoo.jdisc.http.HttpRequest serverRequest = com.yahoo.jdisc.http.HttpRequest
                .newServerRequest(container, uri, method, version, remoteAddress, connectedAtMillis, connectedAtMillis);
        HttpRequest incoming = new HttpRequest(serverRequest, new ByteArrayInputStream(new byte[0]));
        Query query = new Query(incoming);
        Execution e = new Execution(new Chain<Searcher>(ConnectionControlSearcher.createTestInstance(() -> nowMillis)),
                Execution.Context.createContextStub());
        return e.search(query);
    }
Functionality tests for
{@link com.yahoo.search.searchers.ConnectionControlSearcher}.

@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
container-search/src/test/java/com/yahoo/search/searchers/test/ConnectionControlSearcherTestCase.java