This Android application module demonstrates how the ActivityScenario.moveToState(newState:) method offered by Espresso can be used in UI tests to drive an activity forwards or backwards to particular lifecycle states.
The application consists of a single activity named MainActivity which accumulates the name of each of the lifecycle event methods that are called during the activity's lifetime inside of a TextView.
The MainActivityTest class uses this MainActivity class and the TextView which it contains to demonstrate and confirm the behaviour of the ActivityScenario.moveToState(newState:) method.