StepCommand extends BaseCommand { @Override protected void markAsDone() throws Throwable { stepBackend.markStepAsDone(step); } protected  StepCommand(TaskCommand taskCommand, StepBackend stepBackend, StepEntity step);   }
@Test public void testMarkAsDone() throws Throwable { TestStepCommand command = new TestStepCommand(taskCommand, stepBackend, step); command.markAsDone(); StepEntity stepEntity = stepBackend.getStepByTaskIdAndOperation( step.getTask().getId(), step.getOperation()); assertThat(stepEntity.getState(), is(StepEntity.State.COMPLETED)); assertThat(stepEntity.getEndTime(), is(notNullValue())); }