ContainerDestructionWorkflow extends CancellableWorkflow<ContainerDestructionWorkflow.ContainerDestructionPhase> { public void FINALIZE() { environment.setStatus( EnvironmentStatus.HEALTHY ); saveEnvironment(); operationTracker.addLogDone( "Container is destroyed" ); stop(); } ContainerDestructionWorkflow( final EnvironmentManagerImpl environmentManager,
                                         final LocalEnvironment environment, final ContainerHost containerHost,
                                         final TrackerOperation operationTracker ); ContainerDestructionPhase INIT(); ContainerDestructionPhase VALIDATE(); ContainerDestructionPhase DESTROY_CONTAINER(); ContainerDestructionPhase REMOVE_HOSTNAMES(); void FINALIZE(); @Override void fail( final String message, final Throwable e ); @Override void onCancellation();  }
@Test public void testFINALIZE() throws Exception { workflow.FINALIZE(); verify( environmentManager, atLeastOnce() ).update( environment ); }