createOrNull

abstract fun createOrNull(type: KType, obj: Any, block: MokkerySpyConfigurer.Block<Any> = { }): Any?(source)

Creates a spy of given type wrapping obj or null if type is not supported by this factory.

obj must be an instance of given type.