Successfully modified file: /home/Messier82/projects/service-book/app/src/test/java/com/servicebook/ServiceBookApplicationTest.kt (1 replacements). Here is the updated code: ... assertThat(app.beforeSend(SentryEvent(), Hint())).isNull() } @Test @Config(application = SentryEnabledApp::class, sdk = [34]) fun `doSentryInit sets dsn, environment and release with privacy defaults`() { val app = ApplicationProvider.getApplicationContext() val options = SentryAndroidOptions() mockkStatic(io.sentry.android.core.SentryAndroid::class) io.mockk.every { io.sentry.android.core.SentryAndroid.init( any(), any>(), ) } answers { val config = secondArg>() config.configure(options) } app.doSentryInit("https://test@sentry.io/123") assertThat(options.dsn).isEqualTo("https://test@sentry.io/123") assertThat(options.environment).isEqualTo("debug") assertThat(options.release).isEqualTo( "${BuildConfig.APPLICATION_ID}@${BuildConfig.VERSION_NAME}+${BuildConfig.VERSION_CODE}", ) ... assertThat(options.isSendDefaultPii).isFalse() assertThat(options.isEnableUserInteractionTracing).isFalse() assertThat(options.isEnableAutoSessionTracking).isFalse() assertThat(options.isAttachScreenshot).isFalse() assertThat(options.isAttachViewHierarchy).isFalse() unmockkStatic(io.sentry.android.core.SentryAndroid::class) } @Test @Config(application = EnableNowApp::class, sdk = [34]) fun `enableSentryNow calls doSentryInit when dsn present`() { ...