That probably needs a refresh.
For the record, always consult the Javadoc. The AppStateManager docs say precisely which order the methods are called in and when:
http://jmonkeyengine.org/javadoc/com/jme3/app/state/AppStateManager.html
It used to be really inconsistent when some of the methods would get called.
Generally, stateAttached() and stateDetached() are called immediately upon attach and detach but because you may have attached or detached from a separate thread or at some random time independent of the update loop, these methods are not safe to do anything scene graph related. As such, access to Application would be kind of dangerous.
initialize(), cleanup(), and setEnabled() are the ones most app states will want to pay attention to.