```private val restorationTester = StateRestoratio...
# compose
s
Copy code
private val restorationTester = StateRestorationTester(composeTestRule)
Adding a
StateRestorationTester
was the missing link. Notes from the doc 👇
Copy code
Instead of calling ComposeContentTestRule.setContent you need to use setContent on this object, then change your state so there is some change to be restored, then execute emulateSavedInstanceStateRestore and assert your state is restored properly.
Example :
Copy code
composeTestRule.onNodeWithTag(dismissButtonTag).performClick()

emulateSavedInstanceStateRestore()
assert(!sheetState.isVisible)
This works and the test passes 🙂 Thanks folks!