get<T> method
Find a dependency and throw if not found
Implementation
T get<T>({String? tag}) {
final result = find<T>(tag: tag);
if (result == null) {
throw Exception(
'Dependency of type $T${tag != null ? ' with tag $tag' : ''} not found in test container');
}
return result;
}