I do have some old java classes. Sorry if it's something obvious, but what's so special about this case:
Copy code
public class Foo {
private Bar bar;
public Bar getBar() {
return bar;
}
}
==========
val foo = mockk<Foo>()
every { foo.bar } returns mockk() // foo.bar is not mocked and remains null