HostnameModificationWorkflow extends CancellableWorkflow<HostnameModificationWorkflow.HostnameModificationPhase> { public HostnameModificationPhase INIT() { operationTracker.addLog( "Initializing hostname modification" ); environment.setStatus( EnvironmentStatus.UNDER_MODIFICATION ); saveEnvironment(); return skipHostnameUpdate ? HostnameModificationPhase.UPDATE_ETC_HOSTS_FILE : HostnameModificationPhase.CHANGE_HOSTNAME; } 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 testINIT() throws Exception { workflow.INIT(); verify( environmentManager ).update( environment ); }