Create a junit rule to handle mockspresso lifecycle callbacks. Apply this using the org.junit.Rule annotation in your test.