ContainerDestructionWorkflow extends CancellableWorkflow<ContainerDestructionWorkflow.ContainerDestructionPhase> { @Override public void onCancellation() { environment.setStatus( EnvironmentStatus.CANCELLED ); saveEnvironment(); operationTracker.addLogFailed( "Container destruction was cancelled" ); } 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 testOnCancellation() throws Exception { workflow.onCancellation(); verify( trackerOperation, atLeastOnce() ).addLogFailed( anyString() ); }