### Question:
AbstractEthTask implements EthTask<T> { @Override public final CompletableFuture<T> run() { if (!result.isDone() && started.compareAndSet(false, true)) { executeTaskTimed(); result.whenComplete((r, t) -> cleanup()); } return result; } protected  AbstractEthTask(final MetricsSystem metricsSystem); protected  AbstractEthTask(final OperationTimer taskTimer); @Override final CompletableFuture<T> run(); @Override final CompletableFuture<T> runAsync(final ExecutorService executor); @Override final void cancel(); @VisibleForTesting final boolean isDone(); final boolean isFailed(); @VisibleForTesting final boolean isCancelled(); void executeTaskTimed(); double getTaskTimeInSec();  }### Answer:
@Test public void shouldInvokeTimingMethods() { final AbstractEthTask<Void> task = new AbstractEthTask<Void>(mockOperationTimer) { @Override protected void executeTask() {} }; when(mockOperationTimer.startTimer()).thenReturn(mockTimingContext); task.run(); verify(mockOperationTimer).startTimer(); verify(mockTimingContext).stopTimer(); }