EnvironmentCreationWorkflow extends CancellableWorkflow<EnvironmentCreationWorkflow.EnvironmentCreationPhase> { public EnvironmentCreationPhase SET_QUOTA() { operationTracker.addLog( "Settings quotas" ); try { new SetQuotaStep( environment, containerQuotas, operationTracker ).execute(); saveEnvironment(); return EnvironmentCreationPhase.FINALIZE; } 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 testSET_QUOTA() throws Exception { workflow.SET_QUOTA(); verify( environmentManager, atLeastOnce() ).update( environment ); }