### Question:
AbstractLifecycle implements Lifecycle { @Override public final void start() throws LifecycleException { try { if (NEW == this.lifecycleStateMachine.getLifecycleState()) { init(); } if (!this.lifecycleStateMachine.isMeaningfulTransition(STARTING_PREP)) { return; } this.lifecycleStateMachine.transition(STARTING_PREP); startPrepInternal(); this.lifecycleStateMachine.transition(STARTING); startInternal(); this.lifecycleStateMachine.transition(STARTED); } catch (RuntimeException e) { this.lifecycleStateMachine.transition(FAILED); throw new LifecycleException("Start Failed", e); } } protected  AbstractLifecycle(); protected  AbstractLifecycle(LifecycleStateMachine lifecycleStateMachine, LifecycleSupport lifecycleSupport); @Override final void addLifecycleListener(LifecycleListener lifecycleListener); @Override final void destroy(); @Override final LifecycleListener[] findLifecycleListeners(); @Override final LifecycleState getState(); @Override final String getStateName(); @Override final void init(); @Override final void removeLifecycleListener(LifecycleListener lifecycleListener); @Override final void start(); @Override final void stop();  }### Answer:
@Test public void start() throws LifecycleException { when(this.lifecycleStateMachine.isMeaningfulTransition(STARTING_PREP)).thenReturn(true); this.lifecycle.start(); verify(this.lifecycleStateMachine).transition(STARTING_PREP); verify(this.lifecycleStateMachine).transition(STARTING); verify(this.lifecycleStateMachine).transition(STARTED); }
@Test public void startAlreadyStarted() throws LifecycleException { when(this.lifecycleStateMachine.isMeaningfulTransition(STARTING_PREP)).thenReturn(false); this.lifecycle.start(); verify(this.lifecycleStateMachine, times(0)).transition(any(LifecycleState.class)); }
@Test public void startFromNewCausesInit() throws LifecycleException { when(this.lifecycleStateMachine.getLifecycleState()).thenReturn(NEW); when(this.lifecycleStateMachine.isMeaningfulTransition(STARTING_PREP)).thenReturn(true); this.lifecycle.start(); verify(this.lifecycleStateMachine).transition(INITIALIZING); verify(this.lifecycleStateMachine).transition(INITIALIZED); verify(this.lifecycleStateMachine).transition(STARTING_PREP); verify(this.lifecycleStateMachine).transition(STARTING); verify(this.lifecycleStateMachine).transition(STARTED); }