SshKeyRemovalWorkflow extends CancellableWorkflow<SshKeyRemovalWorkflow.SshKeyAdditionPhase> { public SshKeyAdditionPhase REMOVE_KEY() { operationTracker.addLog( "Removing ssh key from containers" ); try { new RemoveSshKeyStep( sshKey, environment, operationTracker ).execute(); saveEnvironment(); return SshKeyAdditionPhase.FINALIZE; } catch ( Exception e ) { fail( e.getMessage(), e ); return null; } } SshKeyRemovalWorkflow( final LocalEnvironment environment, final String sshKey,
                                  final TrackerOperation operationTracker,
                                  final EnvironmentManagerImpl environmentManager ); SshKeyAdditionPhase INIT(); SshKeyAdditionPhase REMOVE_KEY(); void FINALIZE(); @Override void fail( final String message, final Throwable e ); @Override void onCancellation();  }
@Test public void testREMOVE_KEY() throws Exception { workflow.REMOVE_KEY(); verify( environmentManager ).update( environment ); }