Hey guys, having an issue with this. ```class A ...
# mockk
c
Hey guys, having an issue with this.
Copy code
class A  {
 ...

 fun foo(): String { return "bar" }
}

class B {
 private val instance = A()
 
 fun bar(): String {
  return instance.foo()
}
}
In a test, how can I mock the A when testing B? I tried with mockStatic and so on, but with no success yet.. I want to be able to mock
A.foo
when called inside the B class. Can anyone help with this?