### Question:
HostnameModificationWorkflow extends CancellableWorkflow<HostnameModificationWorkflow.HostnameModificationPhase> { @Override public void fail( final String message, final Throwable e ) { environment.setStatus( EnvironmentStatus.UNHEALTHY ); saveEnvironment(); operationTracker.addLogFailed( message ); super.fail( message, e ); } HostnameModificationWorkflow( final LocalEnvironment environment, final ContainerId containerId,
                                         final String newHostname, final TrackerOperation operationTracker,
                                         final EnvironmentManagerImpl environmentManager, final String oldHostname );  HostnameModificationWorkflow( final LocalEnvironment environment, final ContainerId containerId,
                                         final String newHostname, final TrackerOperation operationTracker,
                                         final EnvironmentManagerImpl environmentManager ); HostnameModificationPhase INIT(); HostnameModificationPhase CHANGE_HOSTNAME(); HostnameModificationPhase UPDATE_ETC_HOSTS_FILE(); HostnameModificationPhase UPDATE_AUTHORIZED_KEYS_FILE(); void FINALIZE(); @Override void fail( final String message, final Throwable e ); @Override void onCancellation();  }### Answer:
@Test public void testFail() throws Exception { Throwable throwable = mock( Throwable.class ); workflow.fail( "", throwable ); verify( trackerOperation ).addLogFailed( anyString() ); }