OrderedTask extends Task implements Serializable { public List<Step> getSteps() { return new ArrayList<>(steps); } 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 testGetSteps() throws Exception { List<Step> steps = testTask.getSteps(); assertEquals("Returns list of proper length", 3, steps.size()); assertTrue("Contains expected step", steps.contains(stepTwo)); steps.add(stepOneDupe); steps = testTask.getSteps(); assertEquals("Adding items to the returned list doesn't affect task's internal list", 3, steps.size()); assertFalse("Does not contain illegally added step", steps.contains(stepOneDupe)); }