ModelWizard implements Disposable { private void addStep(@NotNull ModelWizardStep<?> step) { mySteps.add(step); for (ModelWizardStep subStep : step.createDependentSteps()) { myStepOwners.put(subStep, step); addStep(subStep); } } private  ModelWizard(@NotNull Collection<ModelWizardStep> steps); @NotNull ObservableBool canGoBack(); @NotNull ObservableBool canGoForward(); @NotNull ObservableBool onLastStep(); @NotNull TitleHeader getTitleHeader(); void setCancelInterceptor(@NotNull BooleanSupplier cancelInterceptor); @Nullable JComponent getPreferredFocusComponent(); @NotNull JPanel getContentPanel(); boolean goForward(); boolean goBack(); void cancel(); void addResultListener(@NotNull WizardListener listener); void removeResultListener(@NotNull WizardListener listener); boolean isFinished(); @Override void dispose();  }
@Test(expected = IllegalStateException.class) public void cantCreateWizardWithoutAtLeastOneVisibleStep() throws Exception { DummyModel model = new DummyModel(); ModelWizard.Builder wizardBuilder = new ModelWizard.Builder(); GrandparentStep grandparentStep = new GrandparentStep(model); grandparentStep.setShouldSkip(); wizardBuilder.addStep(grandparentStep); wizardBuilder.build(); }