@Test void getExecutionEndTimeThrowsWhenNotRan() { Assertions.assertThrows(IllegalStateException.class, () -> doNothingCommand.getExecutionEndTime()); }
@Override public Instant getExecutionEndTime() { if (executionStartTime == null) throw new IllegalStateException("Command not started yet"); if (executionEndTime == null) throw new IllegalStateException("Command not finished yet"); return executionEndTime; }
AbstractCanonCommand implements CanonCommand<R>, TargetRefCommand<R> { @Override public Instant getExecutionEndTime() { if (executionStartTime == null) throw new IllegalStateException("Command not started yet"); if (executionEndTime == null) throw new IllegalStateException("Command not finished yet"); return executionEndTime; } }
AbstractCanonCommand implements CanonCommand<R>, TargetRefCommand<R> { @Override public Instant getExecutionEndTime() { if (executionStartTime == null) throw new IllegalStateException("Command not started yet"); if (executionEndTime == null) throw new IllegalStateException("Command not finished yet"); return executionEndTime; } protected  AbstractCanonCommand(); protected  AbstractCanonCommand(final AbstractCanonCommand<R> toCopy); }
AbstractCanonCommand implements CanonCommand<R>, TargetRefCommand<R> { @Override public Instant getExecutionEndTime() { if (executionStartTime == null) throw new IllegalStateException("Command not started yet"); if (executionEndTime == null) throw new IllegalStateException("Command not finished yet"); return executionEndTime; } 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); }
AbstractCanonCommand implements CanonCommand<R>, TargetRefCommand<R> { @Override public Instant getExecutionEndTime() { if (executionStartTime == null) throw new IllegalStateException("Command not started yet"); if (executionEndTime == null) throw new IllegalStateException("Command not finished yet"); return executionEndTime; } 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);  }