Successfully modified file: /home/Messier82/projects/service-book/app/src/test/java/com/servicebook/ServiceBookApplicationTest.kt (1 replacements). Here is the updated code: ... import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config internal class SentryEnabledApp : TestServiceBookApplication() { override val sentryDsn = "https://test@sentry.io/123" override fun initDependencies() { super.initDependencies() every { preferences.isCrashReportingEnabledSync() } returns true } } internal class SentryDisabledApp : TestServiceBookApplication() { var doSentryInitCalled = false override val sentryDsn = "https://test@sentry.io/123" override fun initDependencies() { super.initDependencies() every { preferences.isCrashReportingEnabledSync() } returns false } override fun doSentryInit(dsn: String) { doSentryInitCalled = true } } ...