@Override
    public void run(Runnable task) {
        long startNanos = System.nanoTime();

        boolean publishCurrentTask = publishCurrentTask();

        if (publishCurrentTask) {
            currentTask = task;
        }

        try {
            task.run();
        } finally {
            if (publishCurrentTask) {
                currentTask = null;
            }

            record(task, startNanos);
        }
    }
@Test
    public void runTask() {
        final AtomicLong counter = new AtomicLong();
        operationRunner.run(() -> counter.incrementAndGet());
        assertEquals(1, counter.get());
    }