Class ThrowsException
java.lang.Object
org.mockito.internal.stubbing.answers.AbstractThrowsException
org.mockito.internal.stubbing.answers.ThrowsException
- All Implemented Interfaces:
Serializable
,Answer<Object>
,ValidableAnswer
An answer that always throws the same throwable.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThrowsException
(Throwable throwable) Creates a new answer always throwing the given throwable. -
Method Summary
Methods inherited from class org.mockito.internal.stubbing.answers.AbstractThrowsException
answer, validateFor
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
throwable
-
-
Constructor Details
-
ThrowsException
Creates a new answer always throwing the given throwable. If it is null, answer validation will fail.
-
-
Method Details
-
getThrowable
- Specified by:
getThrowable
in classAbstractThrowsException
-