### Question:
AbstractCanonCommand implements CanonCommand<R>, TargetRefCommand<R> { @Override public final void run() { throwIfRunAlreadyCalled(); executionStartTime = currentInstant(); try { result = runInternal(); } catch (InterruptedException e) { resultException = e; } catch (Exception e) { resultException = e; } finally { executionEndTime = currentInstant(); resultBlocker.countDown(); } } protected  AbstractCanonCommand(); protected  AbstractCanonCommand(final AbstractCanonCommand<R> toCopy); @SuppressWarnings("unchecked") @Override AbstractCanonCommand<R> copy(); @Override final void run(); @Override CanonCommand<R> setTargetRef(final EdsBaseRef targetRef); final Optional<EdsBaseRef> getTargetRef(); @Override TargetRefType getTargetRefType(); @Override Instant getCreateTime(); @Override Instant getExecutionStartTime(); @Override boolean hasExecutionStarted(); @Override Instant getExecutionEndTime(); @Override boolean hasExecutionEnded(); @Override R get(); @Override Optional<Duration> getTimeout(); @Override CanonCommand<R> setTimeout(final Duration timeout);  }### Answer:
@Test void runThrowsOnMultipleCall() { doNothingCommand.run(); Assertions.assertThrows(IllegalStateException.class, () -> doNothingCommand.run()); }
@Test void getExecutionDurationSinceNow() { Assertions.assertThrows(IllegalStateException.class, () -> doNothingCommand.getExecutionDurationSinceNow()); doNothingCommand.run(); final Duration duration = doNothingCommand.getExecutionDurationSinceNow(); Assertions.assertNotNull(duration); }
@Test void getExecutionDuration() { Assertions.assertThrows(IllegalStateException.class, () -> doNothingCommand.getExecutionDuration()); doNothingCommand.run(); final Duration duration = doNothingCommand.getExecutionDuration(); Assertions.assertNotNull(duration); }
@Test void getExecutionDurationTotal() { Assertions.assertThrows(IllegalStateException.class, () -> doNothingCommand.getExecutionDurationTotal()); doNothingCommand.run(); final Duration duration = doNothingCommand.getExecutionDurationTotal(); Assertions.assertNotNull(duration); }