Interface MockResolver


public interface MockResolver
A mock resolver offers an opportunity to resolve a mock from any instance that is provided to the Mockito-DSL. This mechanism can be used by frameworks that provide mocks that are implemented by Mockito but which are wrapped by other instances to enhance the proxy further.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(Object instance)
    Returns the provided instance or the unwrapped mock that the provided instance represents.
  • Method Details

    • resolve

      Object resolve(Object instance)
      Returns the provided instance or the unwrapped mock that the provided instance represents. This method must not return null.
      Parameters:
      instance - The instance passed to the Mockito-DSL.
      Returns:
      The provided instance or the unwrapped mock.