From 5f5f74989a8352807472eef0bdbd32ae3300de4f Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Fri, 10 Jul 2026 16:11:15 -0700 Subject: [PATCH] fix: enable returnDefaultValues for feature-account-impl unit tests Log.d/Log.e added to TronAddressBackfillMigration throw 'Method ... not mocked' in plain JVM unit tests without this - the framework's own stubs are meant to be configured this way for exactly this case, not worked around by avoiding Log calls in production code. --- feature-account-impl/build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/feature-account-impl/build.gradle b/feature-account-impl/build.gradle index 1283cf5e..75de034a 100644 --- a/feature-account-impl/build.gradle +++ b/feature-account-impl/build.gradle @@ -13,6 +13,16 @@ android { buildFeatures { viewBinding true } + + testOptions { + unitTests { + // android.util.Log.* throws "Method ... not mocked" by default in plain JVM unit tests (no real + // Android framework, no Robolectric) - TronAddressBackfillMigrationTest is the first test in this + // module to exercise code that calls Log.d/Log.e. This makes those stubbed calls return harmless + // defaults instead of throwing, which is what the framework's own stubs are meant for in this context. + returnDefaultValues = true + } + } } dependencies {