HostnameModificationWorkflow extends CancellableWorkflow<HostnameModificationWorkflow.HostnameModificationPhase> { public void FINALIZE() { environment.setStatus( EnvironmentStatus.HEALTHY ); saveEnvironment(); operationTracker.addLogDone( "Hostname is modified" ); stop(); } 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();  }
@Test public void testFINALIZE() throws Exception { workflow.FINALIZE(); verify( trackerOperation ).addLogDone( anyString() ); }