### Question:
DefaultWizardStepListModel implements WizardStepListModel { @Override public void decrementStep() { setCurrentStep(getCurrentStep() - 1); } DefaultWizardStepListModel(List<? extends String> stepTitles, int initialStep);  DefaultWizardStepListModel(List<? extends String> stepTitles, String initialStepTitle); @Override boolean allStepsAreValid(); @Override void decrementStep(); @Override ChangeSupport<WizardStepListModelChangeListener> getChangeSupport(); @Override int getCurrentStep(); @Override String getCurrentStepTitle(); @Override final int getStepCount(); @Override StepState getStepState(int step); @Override StepState getStepState(String stepTitle); @Override String getStepTitle(int index); @Override List<? extends String> getStepTitles(); @Override void incrementStep(); @Override final void setCurrentStep(int step); @Override final void setCurrentStep(String stepTitle); @Override void refreshCurrentStep(); @Override void setStepState(int step, StepState state); @Override void setStepState(String stepTitle, StepState state);  }### Answer:
@Test public void testDecrementStep() { List<? extends String> steps = Arrays.asList(STEP1, STEP2, STEP3); DefaultWizardStepListModel model = new DefaultWizardStepListModel(steps, 2); WizardStepListModelChangeListener listener = EasyMock.createMock(WizardStepListModelChangeListener.class); model.getChangeSupport().addListener(listener); Assert.assertEquals(2, model.getCurrentStep()); expectStepChange(listener, model, 1, STEP2); model.decrementStep(); Assert.assertEquals(1, model.getCurrentStep()); expectStepChange(listener, model, 0, STEP1); model.decrementStep(); Assert.assertEquals(0, model.getCurrentStep()); try { EasyMock.reset(listener); EasyMock.replay(listener); model.decrementStep(); Assert.fail("Exception should have been thrown."); } catch (IllegalArgumentException e) { EasyMock.verify(listener); } }