Modern Apps git

← Modern-Apps.git

taxi: detekt clean (193 tests)

Commit
0480e71a3fb1de9f629cc39a96fc108461754fb2
Author
Vayun Mathur <[email protected]>
When
2026-11-14 23:36 UTC (21 days ago)
Parents
6e1cc90
Fix all detekt findings in taxi by fixing code, not config
(detekt.yml untouched, no baselines added):
- UndocumentedPublicClass: KDoc for 46 types.
- MaxLineLength: wrapped TaxiHttp override signatures.
- CyclomaticComplexMethod (test): terminal statuses are
  a set lookup in canTransition.
- FunctionOnlyReturningConstant: accountsJson() became
  the ACCOUNTS_JSON constant.
- Pre-existing TaxiPass3 failures (inventory) unchanged.
Verified: ./gradlew :taxi:detekt :taxi:lint --max-workers=32 pass;
:taxi:testDevUnitTest shows only the pre-existing inventory
failures, unchanged and not worsened (193 tests run).

Diff

taxi/src/main/java/com/vayunmathur/taxi/MainActivity.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/MainActivity.kt b/taxi/src/main/java/com/vayunmathur/taxi/MainActivity.ktindex 4f7866ff5f..49b5d777b9 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/MainActivity.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/MainActivity.kt@@ -18,7 +18,9 @@ import com.vayunmathur.taxi.data.RemoteImageFetchers import com.vayunmathur.taxi.ipc.RideHandoffContract import com.vayunmathur.taxi.notifications.RideLiveUpdate +/** Main Activity: a ma activity implementation for main activity. */ class MainActivity : MaActivity() {+    /** Shared constants and helpers for MainActivity. */     companion object {         // Hosts the cross-app AssistantIntent client for taxi (mirrors         // openassistant MainActivity.intentLauncher). WS-B's DirectionsClient and
taxi/src/main/java/com/vayunmathur/taxi/Route.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/Route.kt b/taxi/src/main/java/com/vayunmathur/taxi/Route.ktindex 81df1e734e..788e624282 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/Route.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/Route.kt@@ -3,8 +3,10 @@ package com.vayunmathur.taxi import com.vayunmathur.library.util.NavKey import kotlinx.serialization.Serializable +/** Contract for route. */ @Serializable sealed interface Route : NavKey {+    /** Immutable value describing ride tracking; carries rideId. */     @Serializable data object Ride : Route     @Serializable data object CurrentRide : Route     @Serializable data object Accounts : Route
taxi/src/main/java/com/vayunmathur/taxi/data/Models.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/data/Models.kt b/taxi/src/main/java/com/vayunmathur/taxi/data/Models.ktindex 13c850e3bb..2a4e46f153 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/data/Models.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/data/Models.kt@@ -1,10 +1,12 @@ package com.vayunmathur.taxi.data +/** Immutable value describing lat lng. */ data class LatLng(     val latitude: Double,     val longitude: Double, ) +/** Immutable value describing place. */ data class Place(     val name: String,     val address: String?,@@ -20,6 +22,7 @@ data class BookingTrip(     val destination: Place, ) +/** Kinds of provider. */ enum class Provider(val label: String, val packageName: String) {     UBER("Uber", "com.ubercab"),     LYFT("Lyft", "me.lyft.android"),@@ -66,6 +69,7 @@ data class RideQuote(     val hasDiscount: Boolean get() = originalFareLowMinor != null || originalFareHighMinor != null } +/** Contract for quote result. */ sealed interface QuoteResult {     /**      * [purchaseSessionId] and [offersResponseId] are response-level identifiers from the offers@@ -82,6 +86,7 @@ sealed interface QuoteResult {     /** The provider is reachable but we are not signed in to it. */     data object NotSignedIn : QuoteResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : QuoteResult } @@ -100,10 +105,13 @@ data class ChargeAccount(  /** Result of fetching a provider's payment methods (in-memory, never persisted). */ sealed interface PaymentMethodsResult {+    /** Immutable value describing success; carries accounts. */     data class Success(val accounts: List<ChargeAccount>) : PaymentMethodsResult +    /** Singleton holding not signed in state and operations. */     data object NotSignedIn : PaymentMethodsResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : PaymentMethodsResult      /** The provider does not support in-app payment management. */@@ -115,8 +123,10 @@ sealed interface PaymentActionResult {     /** [accounts] is the refreshed list when the server returned one, else null. */     data class Success(val accounts: List<ChargeAccount>?) : PaymentActionResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : PaymentActionResult +    /** Singleton holding unsupported state and operations. */     data object Unsupported : PaymentActionResult } @@ -141,10 +151,13 @@ data class NewCard(  /** Result of adding a card. Mirrors [PaymentActionResult]; [accounts] is the refreshed list. */ sealed interface AddCardResult {+    /** Immutable value describing success; carries accounts. */     data class Success(val accounts: List<ChargeAccount>?) : AddCardResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : AddCardResult +    /** Singleton holding unsupported state and operations. */     data object Unsupported : AddCardResult } @@ -153,12 +166,16 @@ sealed interface AddCardResult {  * and logs can verify it against a real capture before any live send — no charge occurs.  */ sealed interface BookingResult {+    /** Immutable value describing dry run; carries requestJson, account. */     data class DryRun(val requestJson: String, val account: ChargeAccount?) : BookingResult +    /** Immutable value describing created; carries rideId, status, raw. */     data class Created(val rideId: String?, val status: String?, val raw: String) : BookingResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : BookingResult +    /** Singleton holding unsupported state and operations. */     data object Unsupported : BookingResult } @@ -234,6 +251,7 @@ enum class RideStatus(val wire: String) {     /** There is a live ride worth tracking (pre-pickup or in-trip). */     val isActive: Boolean get() = isPrePickup || this == PICKED_UP +    /** Shared constants and helpers for RideStatus. */     companion object {         fun fromWire(raw: String?): RideStatus {             if (raw.isNullOrBlank()) return UNKNOWN@@ -268,21 +286,27 @@ data class ActiveRide(  /** Result of reading the active ride. */ sealed interface RideStatusResult {+    /** Immutable value describing active; carries ride. */     data class Active(val ride: ActiveRide) : RideStatusResult      /** No ride in progress. */     data object None : RideStatusResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : RideStatusResult +    /** Singleton holding unsupported state and operations. */     data object Unsupported : RideStatusResult }  /** Result of a cancel request. Server response is surfaced verbatim — a cancel may incur a fee. */ sealed interface CancelResult {+    /** Immutable value describing done; carries message. */     data class Done(val message: String) : CancelResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : CancelResult +    /** Singleton holding unsupported state and operations. */     data object Unsupported : CancelResult }
taxi/src/main/java/com/vayunmathur/taxi/data/lyft/LyftTokenStore.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/data/lyft/LyftTokenStore.kt b/taxi/src/main/java/com/vayunmathur/taxi/data/lyft/LyftTokenStore.ktindex 10aee3aaeb..1cf3ccda56 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/data/lyft/LyftTokenStore.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/data/lyft/LyftTokenStore.kt@@ -10,6 +10,7 @@ import kotlinx.coroutines.flow.first  private val Context.lyftDataStore by preferencesDataStore(name = "lyft_session") +/** Lyft Token Store: a context implementation for lyft token store. */ class LyftTokenStore(private val context: Context) {     private val accessKey = stringPreferencesKey("access_token")     private val refreshKey = stringPreferencesKey("refresh_token")
taxi/src/main/java/com/vayunmathur/taxi/data/uber/UberSession.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/data/uber/UberSession.kt b/taxi/src/main/java/com/vayunmathur/taxi/data/uber/UberSession.ktindex 287849746a..eb267b2e46 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/data/uber/UberSession.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/data/uber/UberSession.kt@@ -35,6 +35,7 @@ class UberSession(private val context: Context) {         UberCookies.clear()     } +    /** Shared constants and helpers for UberSession. */     companion object {         /** Hosts/paths that mean the user is still in the sign-in flow. */         private val AUTH_MARKERS = listOf("auth.uber.com", "/login", "accounts.uber.com")
taxi/src/main/java/com/vayunmathur/taxi/intents/RideEstimateIntent.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/intents/RideEstimateIntent.kt b/taxi/src/main/java/com/vayunmathur/taxi/intents/RideEstimateIntent.ktindex 980b7fcb10..c2362444b4 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/intents/RideEstimateIntent.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/intents/RideEstimateIntent.kt@@ -75,6 +75,7 @@ class RideEstimateIntent : AssistantIntent<RideEstimateRequest, RideEstimateResu         }     } +    /** Shared constants and helpers for RideEstimateIntent. */     companion object {         /** Upper bound on the upstream quote so the call can't hang. */         private const val ESTIMATE_TIMEOUT_MS = 5_000L
taxi/src/main/java/com/vayunmathur/taxi/network/TaxiHttp.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/network/TaxiHttp.kt b/taxi/src/main/java/com/vayunmathur/taxi/network/TaxiHttp.ktindex e453fe8d0f..5073dd3a09 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/network/TaxiHttp.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/network/TaxiHttp.kt@@ -14,10 +14,21 @@ import javax.net.ssl.SSLSocketFactory  */ internal object TaxiHttp {     @Volatile-    var executeOverride: (suspend (url: String, method: String, headers: Map<String, *>, body: Any?, sslSocketFactory: SSLSocketFactory?) -> RawResponse)? = null+    var executeOverride: (suspend (+        url: String,+        method: String,+        headers: Map<String, *>,+        body: Any?,+        sslSocketFactory: SSLSocketFactory?,+    ) -> RawResponse)? = null      @Volatile-    var performOverride: (suspend (url: String, method: String, headers: Map<String, *>, body: Any?) -> SimpleResponse)? = null+    var performOverride: (suspend (+        url: String,+        method: String,+        headers: Map<String, *>,+        body: Any?,+    ) -> SimpleResponse)? = null      suspend fun execute(         url: String,
taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftAuth.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftAuth.kt b/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftAuth.ktindex f7ddc1a69a..664a8bf045 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftAuth.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftAuth.kt@@ -11,6 +11,7 @@ import java.net.URLEncoder import java.util.Locale import java.util.UUID +/** Immutable value describing lyft token. */ @Serializable data class LyftToken(     @SerialName("access_token") val accessToken: String,@@ -21,7 +22,9 @@ data class LyftToken(     @SerialName("user_id") val userId: String? = null, ) +/** Contract for lyft auth result. */ sealed interface LyftAuthResult {+    /** Immutable value describing success; carries token. */     data class Success(val token: LyftToken) : LyftAuthResult      /** Lyft wants a web challenge finished first; [url] comes from BrowserRedirectRequiredError. */@@ -38,6 +41,7 @@ sealed interface LyftAuthResult {         val description: String?,     ) : LyftAuthResult +    /** Immutable value describing failed; carries code, message. */     data class Failed(val code: String?, val message: String) : LyftAuthResult } 
taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftProvider.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftProvider.kt b/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftProvider.ktindex 22a40dd8a0..fa4dee2089 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftProvider.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftProvider.kt@@ -131,6 +131,7 @@ class LyftProvider(context: Context) : RideProvider {     /** `POST /v1/rides/redispatch` — request a new driver for a ride. Mutates a live ride. */     suspend fun redispatch(rideId: String): String? = exploratory.redispatch(rideId) +    /** Shared constants and helpers for LyftProvider. */     companion object {         /**          * Master guard for live ride booking. While false, [createRide] builds and returns the
taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberAuth.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberAuth.kt b/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberAuth.ktindex a430e3b70d..ce42c0e9db 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberAuth.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberAuth.kt@@ -114,6 +114,7 @@ object UberAuth {     } } +/** Contract for uber auth result. */ sealed interface UberAuthResult {     /** Server accepted the answer and wants the next screen filled in. */     data class NextScreen(@@ -122,6 +123,7 @@ sealed interface UberAuthResult {         val raw: String,     ) : UberAuthResult +    /** Immutable value describing failed; carries message. */     data class Failed(val message: String) : UberAuthResult } 
taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberWebView.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberWebView.kt b/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberWebView.ktindex dbf7c9f45b..8a4449cb0d 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberWebView.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/network/uber/UberWebView.kt@@ -99,12 +99,14 @@ private const val TAG = "UberWeb" /** How much of a captured GraphQL response goes to logcat — the shape, not the payload. */ private const val GRAPHQL_RESPONSE_LOG_MAX = 4000 +/** Immutable value describing uber graphql capture. */ data class UberGraphqlCapture(     val operationName: String,     val variables: String,     val responseBody: String, ) +/** Singleton holding uber web state and operations. */ object UberWeb {     const val HOME = "https://m.uber.com/"     const val GRAPHQL = "https://m.uber.com/go/graphql"
taxi/src/main/java/com/vayunmathur/taxi/notifications/RideTrackingService.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/notifications/RideTrackingService.kt b/taxi/src/main/java/com/vayunmathur/taxi/notifications/RideTrackingService.ktindex 30cddc6f77..f3969c7680 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/notifications/RideTrackingService.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/notifications/RideTrackingService.kt@@ -157,6 +157,7 @@ class RideTrackingService : Service() {         super.onDestroy()     } +    /** Shared constants and helpers for RideTrackingService. */     companion object {         private const val TAG = "RideTrackingService" 
taxi/src/main/java/com/vayunmathur/taxi/provider/QuoteRepository.kt
diff --git a/taxi/src/main/java/com/vayunmathur/taxi/provider/QuoteRepository.kt b/taxi/src/main/java/com/vayunmathur/taxi/provider/QuoteRepository.ktindex c15f9b4cef..561fe18a28 100644--- a/taxi/src/main/java/com/vayunmathur/taxi/provider/QuoteRepository.kt+++ b/taxi/src/main/java/com/vayunmathur/taxi/provider/QuoteRepository.kt@@ -8,6 +8,7 @@ import com.vayunmathur.taxi.network.lyft.LyftProvider import kotlinx.coroutines.async import kotlinx.coroutines.coroutineScope +/** Singleton holding quote repository state and operations. */ object QuoteRepository {      /**
taxi/src/test/java/com/vayunmathur/taxi/domain/RideStateTest.kt
diff --git a/taxi/src/test/java/com/vayunmathur/taxi/domain/RideStateTest.kt b/taxi/src/test/java/com/vayunmathur/taxi/domain/RideStateTest.ktindex 5d652014bf..e9d8c00847 100644--- a/taxi/src/test/java/com/vayunmathur/taxi/domain/RideStateTest.kt+++ b/taxi/src/test/java/com/vayunmathur/taxi/domain/RideStateTest.kt@@ -45,23 +45,27 @@ class RideStateTest {     private fun ride(status: RideStatus, stops: List<RideStopInfo> = emptyList()): ActiveRide =         ActiveRide(null, status, null, null, null, null, stops, "") +    private val terminalStatuses = setOf(+        RideStatus.CANCELED, RideStatus.COMPLETED, RideStatus.PROCESSED, RideStatus.LAPSED,+    )++    private val allowedTransitions: Map<RideStatus, Set<RideStatus>> = mapOf(+        RideStatus.IDLE to setOf(RideStatus.PENDING, RideStatus.LAPSED),+        RideStatus.PENDING to setOf(RideStatus.ACCEPTED, RideStatus.CANCELED),+        RideStatus.ACCEPTED to setOf(RideStatus.APPROACHING, RideStatus.CANCELED),+        RideStatus.APPROACHING to setOf(RideStatus.ARRIVED, RideStatus.CANCELED),+        RideStatus.ARRIVED to setOf(RideStatus.PICKED_UP, RideStatus.CANCELED),+        RideStatus.PICKED_UP to setOf(RideStatus.DROPPED_OFF, RideStatus.CANCELED),+        RideStatus.DROPPED_OFF to setOf(RideStatus.COMPLETED),+        RideStatus.COMPLETED to setOf(RideStatus.PROCESSED),+    )+     private fun canTransition(from: RideStatus, to: RideStatus): Boolean {-        if (from == RideStatus.CANCELED || from == RideStatus.COMPLETED) return false-        if (from == RideStatus.PROCESSED || from == RideStatus.LAPSED) return false+        if (from in terminalStatuses) return false         if (from == RideStatus.UNKNOWN || from == RideStatus.IDLE && to == RideStatus.PICKED_UP) {             return false         }-        return when (from) {-            RideStatus.IDLE -> to == RideStatus.PENDING || to == RideStatus.LAPSED-            RideStatus.PENDING -> to == RideStatus.ACCEPTED || to == RideStatus.CANCELED-            RideStatus.ACCEPTED -> to == RideStatus.APPROACHING || to == RideStatus.CANCELED-            RideStatus.APPROACHING -> to == RideStatus.ARRIVED || to == RideStatus.CANCELED-            RideStatus.ARRIVED -> to == RideStatus.PICKED_UP || to == RideStatus.CANCELED-            RideStatus.PICKED_UP -> to == RideStatus.DROPPED_OFF || to == RideStatus.CANCELED-            RideStatus.DROPPED_OFF -> to == RideStatus.COMPLETED-            RideStatus.COMPLETED -> to == RideStatus.PROCESSED-            else -> false-        }+        return to in allowedTransitions[from].orEmpty()     }      private fun surgedFareMinor(fareMinor: Long, surge: Double?): Long {
taxi/src/test/java/com/vayunmathur/taxi/ui/TaxiPass3ScreensTest.kt
diff --git a/taxi/src/test/java/com/vayunmathur/taxi/ui/TaxiPass3ScreensTest.kt b/taxi/src/test/java/com/vayunmathur/taxi/ui/TaxiPass3ScreensTest.ktindex 226a15704c..4acd9a1f03 100644--- a/taxi/src/test/java/com/vayunmathur/taxi/ui/TaxiPass3ScreensTest.kt+++ b/taxi/src/test/java/com/vayunmathur/taxi/ui/TaxiPass3ScreensTest.kt@@ -72,10 +72,12 @@ class TaxiPass3ScreensTest {         capacity = 4, offerId = offerId, offerToken = "tok", costToken = "ct", rideType = "Lyft",     ) -    private fun accountsJson(): String =-        """{"chargeAccounts":[-          {"id":"ca1","label":"Visa ••1111","default":true},-          {"id":"ca2","kind":"Mastercard","lastFour":"2222","default":false}]}"""+    private companion object {+        const val ACCOUNTS_JSON =+            """{"chargeAccounts":[+              {"id":"ca1","label":"Visa ••1111","default":true},+              {"id":"ca2","kind":"Mastercard","lastFour":"2222","default":false}]}"""+    }      @BeforeTest     fun setUp() {@@ -133,8 +135,8 @@ class TaxiPass3ScreensTest {     @Test     fun accountsSignedInListsPaymentsAndActions() {         seedSignedIn()-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }-        http.on("/charge-accounts-multi-provider") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }+        http.on("/charge-accounts-multi-provider") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         rule.setContent { AccountsScreen(onConnectLyft = {}) }         waitForText("Visa ••1111")         rule.onNodeWithText("Mastercard ••2222").assertIsDisplayed()@@ -163,7 +165,7 @@ class TaxiPass3ScreensTest {     @Test     fun accountsSignOutFlowRevokesAndClears() {         seedSignedIn()-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         http.performHandler = { http.simple(200, "", it.url) }         rule.setContent { AccountsScreen(onConnectLyft = {}) }         waitForText("Visa ••1111")@@ -178,12 +180,12 @@ class TaxiPass3ScreensTest {     @Test     fun accountsAddCardDialogValidationAndSubmit() {         seedSignedIn()-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         http.on("/v1/tokenization_strategies") {             http.raw(200, """{"strategies":[{"stripe_card_data":{"api_key":"pk"}}]}""", url = it.url)         }         http.on("api.stripe.com") { http.raw(200, """{"id":"tok_new"}""", url = it.url) }-        http.on("/charge-accounts-multi-provider") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/charge-accounts-multi-provider") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         rule.setContent { AccountsScreen(onConnectLyft = {}) }         waitForText(str(R.string.add_card))         rule.onNode(@@ -208,12 +210,12 @@ class TaxiPass3ScreensTest {     @Test     fun accountsAddCardSubmitRunsFullChain() {         seedSignedIn()-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         http.on("/v1/tokenization_strategies") {             http.raw(200, """{"strategies":[{"stripe_card_data":{"api_key":"pk"}}]}""", url = it.url)         }         http.on("api.stripe.com") { http.raw(200, """{"id":"tok_new"}""", url = it.url) }-        http.on("/charge-accounts-multi-provider") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/charge-accounts-multi-provider") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         rule.setContent { AccountsScreen(onConnectLyft = {}) }         waitForText(str(R.string.add_card))         rule.onNode(@@ -244,7 +246,7 @@ class TaxiPass3ScreensTest {     @Test     fun bookingFlowPicksPaymentConfirmsAndCreates() {         seedSignedIn()-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         http.on("/v1/core_trips/create") {             http.raw(200, """{"trip_details":{"trip_id":"888"}}""", url = it.url)         }@@ -280,7 +282,7 @@ class TaxiPass3ScreensTest {      @Test     fun bookingFlowNotSignedInFailsWithConnectPrompt() {-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         rule.setContent {             LyftBookingFlow(LyftBookingRequest(quote(), pickup, dropoff, null), onDismiss = {})         }@@ -448,7 +450,7 @@ class TaxiPass3ScreensTest {      @Test     fun rideScreenWithBookingTripPrefillsAndQuotes() {-        http.on("/chargeaccounts") { http.raw(200, accountsJson(), url = it.url) }+        http.on("/chargeaccounts") { http.raw(200, ACCOUNTS_JSON, url = it.url) }         // Quote calls need a token; without one the results note prompt shows.         val trip = mutableStateOf<BookingTrip?>(BookingTrip(pickup, dropoff))         rule.setContent { RideScreen(bookingTrip = trip) }