I am trying below to mockk Android API - ServiceInfo class.
val resolveInfo = mockk<ResolveInfo>()
val mockServiceInfo = spyk(ServiceInfo())
every { resolveInfo.serviceInfo }.returns(mockServiceInfo)
This is giving me an exception on the last line: io.mockk.MockKException: Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock