P2PSecretKeyModificationWorkflow extends CancellableWorkflow<P2PSecretKeyModificationWorkflow.P2PSecretKeyModificationPhase> { public void FINALIZE() { environment.setStatus( EnvironmentStatus.HEALTHY ); saveEnvironment(); operationTracker.addLogDone( "P2P secret key is modified" ); stop(); } 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 testFINALIZE() throws Exception { workflow.FINALIZE(); verify( trackerOperation ).addLogDone( anyString() ); }