anchor.diff:    /// [InvalidMockitoAnnotationException] under various conditions.
     static analyzer.InterfaceType _determineDartType(
         analyzer.DartType typeToMock, TypeProvider typeProvider) {
  -    final elementToMock = typeToMock.element;
  -    if (elementToMock is ClassElement) {
  +    if (typeToMock is analyzer.InterfaceType) {
  +      final elementToMock = typeToMock.element;
         if (elementToMock.isEnum) {
           throw InvalidMockitoAnnotationException(
               'Mockito cannot mock an enum: ${elementToMock.displayName}');
  
positive.code: 
      for (var parameter in function.parameters) {
        var parameterType = parameter.type;
        var parameterTypeElement = parameterType.element;
        if (parameterType is analyzer.InterfaceType) {
          if (parameterTypeElement?.isPrivate ?? false) {
            // Technically, we can expand the type in the mock to something like
            // `Object?`. However, until there is a decent use case, we will not
  
negative.code: 
      errorMessages
          .addAll(_checkTypeParameters(function.typeFormals, enclosingElement));
  
      var aliasArguments = function.aliasArguments;
      if (aliasArguments != null) {
        errorMessages
            .addAll(_checkTypeArguments(aliasArguments, enclosingElement));
      }
  
      return errorMessages;
    }
  