We use convenience initialisers in order to provide reusable mocked instances:
The compiler is warning us of:
'given' is deprecated: Use given(_ service:) instead.
However when replacing with:
convenience init(metadata: SpotlightMetadataModel, isInWatchlist: Bool) {
self.init(policy: .relaxed)
given(self)
We get the following error:
Use of 'given' refers to instance method rather than global function 'given' in module 'Mockable'