P2PSecretKeyModificationWorkflow extends CancellableWorkflow<P2PSecretKeyModificationWorkflow.P2PSecretKeyModificationPhase> { public P2PSecretKeyModificationPhase INIT() { operationTracker.addLog( "Initializing P2P secret key modification" ); environment.setStatus( EnvironmentStatus.UNDER_MODIFICATION ); saveEnvironment(); return P2PSecretKeyModificationPhase.REPLACE_KEY; } P2PSecretKeyModificationWorkflow( final LocalEnvironment environment, final String p2pSecretKey,
                                             final long p2pSecretKeyTtlSeconds, final TrackerOperation operationTracker,
                                             final EnvironmentManagerImpl environmentManager ); P2PSecretKeyModificationPhase INIT(); P2PSecretKeyModificationPhase REPLACE_KEY(); void FINALIZE(); @Override void fail( final String message, final Throwable e ); @Override void onCancellation(); static final String P2P_CAUSE; }
@Test public void testINIT() throws Exception { workflow.INIT(); verify( environmentManager ).update( environment ); }