findDependency

inline fun <T> MockspressoProperties.findDependency(qualifier: Annotation? = null): Lazy<T>

Find an existing dependency in the underlying mockspresso instance (bound with a dependencyKey of type T + qualifier) and return a Lazy for access to it.

IMPORTANT: Reading the value from the returned lazy will cause the underlying MockspressoInstance to be ensured if it hasn't been already.

If the dependency hasn't been cached or constructed then it will be generated on the fly and cached from that point forward. If the binding hasn't been declared in this mockspresso instance, then a fallback will be generated.