Class RedundantListenerException

All Implemented Interfaces:
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:
  • Constructor Details

    • RedundantListenerException

      public RedundantListenerException(String message)