### Question:
AbstractLifecycle implements Lifecycle { @Override public final String getStateName() { return getState().name(); } 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 stateName() { when(this.lifecycleStateMachine.getLifecycleState()).thenReturn(NEW); assertEquals("NEW", this.lifecycle.getStateName()); }