### Question:
DomainStatusUpdater { static Step createEndProgressingStep(Step next) { return new EndProgressingStep(next); } private  DomainStatusUpdater(); static Step createStatusUpdateStep(Step next); static Step createProgressingStep(String reason, boolean isPreserveAvailable, Step next); static Step createProgressingStep(DomainPresenceInfo info, String reason, boolean isPreserveAvailable,
                                           Step next); static Step createAvailableStep(String reason, Step next); static Step createFailedStep(CallResponse<?> callResponse, Step next); static Step createFailedStep(String reason, String message, Step next); static Step createFailedStep(DomainPresenceInfo info, String reason, String message, Step next); static final String INSPECTING_DOMAIN_PROGRESS_REASON; static final String ADMIN_SERVER_STARTING_PROGRESS_REASON; static final String MANAGED_SERVERS_STARTING_PROGRESS_REASON; static final String SERVERS_READY_REASON; static final String ALL_STOPPED_AVAILABLE_REASON; static final String BAD_DOMAIN; static final String ERR_INTROSPECTOR; static final String BAD_TOPOLOGY; }### Answer:
@Test public void whenDomainHasNoConditions_endProgressingStepDoesNothing() { testSupport.runSteps(DomainStatusUpdater.createEndProgressingStep(endStep)); assertThat(testSupport.getNumCalls(), equalTo(0)); }
@Test public void whenDomainHasProgressingTrueCondition_endProgressingStepRemovesIt() { domain.getStatus().addCondition(new DomainCondition(Progressing).withStatus("True")); testSupport.runSteps(DomainStatusUpdater.createEndProgressingStep(endStep)); assertThat(getRecordedDomain(), not(hasCondition(Progressing))); }
@Test public void whenDomainHasProgressingNotTrueCondition_endProgressingStepIgnoresIt() { domain.getStatus().addCondition(new DomainCondition(Progressing).withStatus("?")); testSupport.runSteps(DomainStatusUpdater.createEndProgressingStep(endStep)); assertThat(testSupport.getNumCalls(), equalTo(0)); }
@Test public void whenDomainHasAvailableCondition_endProgressingStepIgnoresIt() { domain.getStatus().addCondition(new DomainCondition(Available)); testSupport.runSteps(DomainStatusUpdater.createEndProgressingStep(endStep)); assertThat(testSupport.getNumCalls(), equalTo(0)); }
@Test public void whenDomainHasFailedCondition_endProgressingStepIgnoresIt() { domain.getStatus().addCondition(new DomainCondition(Failed)); testSupport.runSteps(DomainStatusUpdater.createEndProgressingStep(endStep)); assertThat(testSupport.getNumCalls(), equalTo(0)); }