EnvironmentCreationWorkflow extends CancellableWorkflow<EnvironmentCreationWorkflow.EnvironmentCreationPhase> { public EnvironmentCreationPhase GENERATE_KEYS() { operationTracker.addLog( "Securing channel" ); try { new PEKGenerationStep( topology, environment, peerManager, securityManager, operationTracker ).execute(); saveEnvironment(); return EnvironmentCreationPhase.RESERVE_NET; } catch ( Exception e ) { fail( e.getMessage(), e ); return null; } } 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 testGENERATE_KEYS() throws Exception { workflow.GENERATE_KEYS(); verify( environmentManager, atLeastOnce() ).update( environment ); }