public int doWork()
    {
        final long nowNs = nanoClock.nanoTime();
        trackTime(nowNs);

        int workCount = 0;
        workCount += processTimers(nowNs);
        if (!asyncClientCommandInFlight)
        {
            workCount += clientCommandAdapter.receive();
        }
        workCount += drainCommandQueue();
        workCount += trackStreamPositions(workCount, nowNs);
        workCount += nameResolver.doWork(cachedEpochClock.time());
        workCount += freeEndOfLifeResources(ctx.resourceFreeLimit());

        return workCount;
    }
@Test
    void shouldRemoveSingleCounter()
    {
        final long registrationId = driverProxy.addCounter(
            COUNTER_TYPE_ID,
            counterKeyAndLabel,
            COUNTER_KEY_OFFSET,
            COUNTER_KEY_LENGTH,
            counterKeyAndLabel,
            COUNTER_LABEL_OFFSET,
            COUNTER_LABEL_LENGTH);

        driverConductor.doWork();

        final long removeCorrelationId = driverProxy.removeCounter(registrationId);
        driverConductor.doWork();

        final ArgumentCaptor<Integer> captor = ArgumentCaptor.forClass(Integer.class);

        final InOrder inOrder = inOrder(mockClientProxy);
        inOrder.verify(mockClientProxy).onCounterReady(eq(registrationId), captor.capture());
        inOrder.verify(mockClientProxy).operationSucceeded(removeCorrelationId);

        verify(spyCountersManager).free(captor.getValue());
    }