EnvironmentModifyWorkflow extends CancellableWorkflow<EnvironmentModifyWorkflow.EnvironmentModificationPhase> { public EnvironmentModificationPhase RESERVE_NET() { operationTracker.addLog( "Reserving network resources" ); try { new ReservationStep( topology, environment, peerManager, identityManager, operationTracker ).execute(); saveEnvironment(); return EnvironmentModificationPhase.SETUP_P2P; } 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 testRESERVE_NET() throws Exception { workflow.RESERVE_NET(); verify( environmentManager ).update( environment ); }