Class RedundantListenerException

  • All Implemented Interfaces:
    java.io.Serializable

    public class RedundantListenerException
    extends MockitoException
    Reported when instance of MockitoListener is being added to Mockito (see MockitoFramework) and there is already a listener with this implementation type registered. Note that it is ok to add multiple different implementations of the same listener interface type.

    Indicates a user error - previous listener was not removed according to the API specification - see MockitoFramework.addListener(MockitoListener).

    Since:
    2.5.2
    See Also:
    Serialized Form
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RedundantListenerException

        public RedundantListenerException​(java.lang.String message)