Android doc say:
\"When the system, rather than the user, shuts down an activity to conserve memory, ... \"
But how to simulate
Good answers here.
Now, residing in the distant future, using Instant Run in Android Studio will also trigger a save and restore when activities are restarted with code changes.