EnvironmentCreationWorkflow extends CancellableWorkflow<EnvironmentCreationWorkflow.EnvironmentCreationPhase> { public EnvironmentCreationPhase INIT() { operationTracker.addLog( "Initializing environment creation" ); environment.setStatus( EnvironmentStatus.UNDER_MODIFICATION ); saveEnvironment(); return EnvironmentCreationPhase.GENERATE_KEYS; } EnvironmentCreationWorkflow( String defaultDomain, IdentityManager identityManager,
                                        EnvironmentManagerImpl environmentManager, PeerManager peerManager,
                                        SecurityManager securityManager, LocalEnvironment environment,
                                        Topology topology, String sshKey, TrackerOperation operationTracker ); EnvironmentCreationPhase INIT(); EnvironmentCreationPhase GENERATE_KEYS(); EnvironmentCreationPhase RESERVE_NET(); EnvironmentCreationPhase SETUP_P2P(); EnvironmentCreationPhase PREPARE_TEMPLATES(); EnvironmentCreationPhase CLONE_CONTAINERS(); EnvironmentCreationPhase CONFIGURE_HOSTS(); EnvironmentCreationPhase CONFIGURE_SSH(); EnvironmentCreationPhase SET_QUOTA(); void FINALIZE(); @Override void fail( final String message, final Throwable e ); @Override void onCancellation();  }
@Test public void testINIT() throws Exception { workflow.INIT(); verify( environmentManager, atLeastOnce() ).update( environment ); }