我是单元测试和 Mockito 的新手。我正在尝试为以下 firebase 调用编写单元测试。谁能帮助我如何使用 Mockito 为 FirebaseMessaging 编写单元测试。谢谢
fun unsubscribeEventVoucherTopic(String topic) {
FirebaseMessaging.getInstance().unsubscribeFromTopic(topic).addOnCompleteListener { task ->
val msg = "unsubscribe $topic success: ${task.isSuccessful}"
Log.d(TAG, "unsubscribeEventVoucherTopic: $msg")
}
}