@Override
    public void doWork() {
        pollOnce(Long.MAX_VALUE);
    }
@Test
    public void testShouldCreateClientRequestAndSendWhenNodeIsReady() {
        final AbstractRequest.Builder<?> request = new StubRequestBuilder<>();
        final Node node = new Node(1, "", 8080);
        final RequestAndCompletionHandler handler =
            new RequestAndCompletionHandler(time.milliseconds(), node, request, completionHandler);
        final TestInterBrokerSendThread sendThread = new TestInterBrokerSendThread();

        final ClientRequest clientRequest =
            new ClientRequest("dest", request, 0, "1", 0, true, requestTimeoutMs, handler.handler);

        when(networkClient.newClientRequest(
            ArgumentMatchers.eq("1"),
            same(handler.request),
            anyLong(),
            ArgumentMatchers.eq(true),
            ArgumentMatchers.eq(requestTimeoutMs),
            same(handler.handler)
        )).thenReturn(clientRequest);

        when(networkClient.ready(node, time.milliseconds())).thenReturn(true);

        when(networkClient.poll(anyLong(), anyLong())).thenReturn(Collections.emptyList());

        sendThread.enqueue(handler);
        sendThread.doWork();

        verify(networkClient)
            .newClientRequest(
                ArgumentMatchers.eq("1"),
                same(handler.request),
                anyLong(),
                ArgumentMatchers.eq(true),
                ArgumentMatchers.eq(requestTimeoutMs),
                same(handler.handler));
        verify(networkClient).ready(any(), anyLong());
        verify(networkClient).send(same(clientRequest), anyLong());
        verify(networkClient).poll(anyLong(), anyLong());
        verifyNoMoreInteractions(networkClient);

        assertFalse(completionHandler.executedWithDisconnectedResponse);
    }