OrderedTask extends Task implements Serializable { @Override public Step getStepWithIdentifier(String identifier) { for (Step step : steps) { if (identifier.equals(step.getIdentifier())) { return step; } } return null; } OrderedTask(String identifier, List<Step> steps);  OrderedTask(String identifier, Step... steps); @Override Step getStepAfterStep(Step step, TaskResult result); @Override Step getStepBeforeStep(Step step, TaskResult result); @Override Step getStepWithIdentifier(String identifier); @Override TaskProgress getProgressOfCurrentStep(Step step, TaskResult result); @Override String getTitleForStep(Context context, Step step); @Override void validateParameters(); List<Step> getSteps();  }
@Test public void testGetStepWithIdentifier() throws Exception { Step foundStep = testTask.getStepWithIdentifier("idOne"); assertEquals("Finds step if it is in the task", stepOne, foundStep); foundStep = testTask.getStepWithIdentifier("non-existent"); assertNull("Returns null if no step in the task has that identifier", foundStep); }