ContainerDestructionWorkflow extends CancellableWorkflow<ContainerDestructionWorkflow.ContainerDestructionPhase> { @Override public void fail( final String message, final Throwable e ) { environment.setStatus( isLastContainer ? EnvironmentStatus.HEALTHY : EnvironmentStatus.UNHEALTHY ); saveEnvironment(); operationTracker.addLogFailed( message ); super.fail( message, e ); } 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 testFail() throws Exception { workflow.fail( "", null ); verify( trackerOperation, atLeastOnce() ).addLogFailed( anyString() ); }