replaceInstance<T> abstract method
Replaces an instance record with a concrete instance.
This function should only be used for unit testing.
Any other use is discouraged.
When key
is provided it will search the instance that have the same key
Implementation
void replaceInstance<T>(T instance, {String? key});