EnvironmentModifyWorkflow extends CancellableWorkflow<EnvironmentModifyWorkflow.EnvironmentModificationPhase> { public EnvironmentModificationPhase SETUP_P2P() { operationTracker.addLog( "Setting up networking" ); try { new SetupP2PStep( topology, environment, operationTracker ).execute(); saveEnvironment(); return EnvironmentModificationPhase.PREPARE_TEMPLATES; } catch ( Exception e ) { fail( e.getMessage(), e ); return null; } } EnvironmentModifyWorkflow( String defaultDomain, IdentityManager identityManager, PeerManager peerManager,
                                      SecurityManager securityManager, LocalEnvironment environment, Topology topology,
                                      Set<String> removedContainers, Map<String, ContainerQuota> changedContainers,
                                      TrackerOperation operationTracker, EnvironmentManagerImpl environmentManager ); EnvironmentModificationPhase INIT(); EnvironmentModificationPhase GENERATE_KEYS(); EnvironmentModificationPhase RESERVE_NET(); EnvironmentModificationPhase SETUP_P2P(); EnvironmentModificationPhase PREPARE_TEMPLATES(); EnvironmentModificationPhase CLONE_CONTAINERS(); EnvironmentModificationPhase CONFIGURE_HOSTS(); EnvironmentModificationPhase CONFIGURE_SSH(); EnvironmentModificationPhase SET_QUOTA(); EnvironmentModificationPhase MODIFY_QUOTA(); EnvironmentModificationPhase DESTROY_CONTAINERS(); EnvironmentModificationPhase REMOVE_HOSTNAMES(); void FINALIZE(); @Override void fail( final String message, final Throwable e ); @Override void onCancellation();  }
@Test public void testSETUP_P2P() throws Exception { workflow.SETUP_P2P(); verify( environmentManager ).update( environment ); }