createOrNull

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

Creates a mock of given type or null if type is not supported by this factory.

If it's possible to create a mock with given type, then configuration block is applied to created instance.