Skip navigation links
A B C D E F G H I J L M N O P R S T U V W 

A

AbstractAwareMethod - Interface in org.mockito.internal.invocation
 
AccessibilityChanger - Class in org.mockito.internal.util.reflection
 
AccessibilityChanger() - Constructor for class org.mockito.internal.util.reflection.AccessibilityChanger
 
actualParameterizedType(Object) - Method in class org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs
 
actualTypeArguments() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
add(Object) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
add(Object) - Method in class org.mockito.internal.util.collections.IdentitySet
 
add(V) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
 
add(Invocation) - Method in class org.mockito.internal.verification.DefaultRegisteredInvocations
 
add(Invocation) - Method in interface org.mockito.internal.verification.RegisteredInvocations
 
add(Invocation) - Method in class org.mockito.internal.verification.SingleRegisteredInvocation
 
addAll(Collection<?>) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
addAnswer(Answer, Strictness) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
addAnswer(Answer, boolean, Strictness) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
Adds new stubbed answer and returns the invocation matcher the answer was added to.
addAnswer(Answer) - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
addConsecutiveAnswer(Answer) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
AdditionalAnswers - Class in org.mockito
Additional answers provides factory methods for answers.
AdditionalAnswers() - Constructor for class org.mockito.AdditionalAnswers
 
AdditionalMatchers - Class in org.mockito
See Matchers for general info about matchers.
AdditionalMatchers() - Constructor for class org.mockito.AdditionalMatchers
 
addListener(MockitoListener) - Method in class org.mockito.internal.framework.DefaultMockitoFramework
 
addListener(MockitoListener) - Method in interface org.mockito.internal.progress.MockingProgress
 
addListener(MockitoListener) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
addListener(MockitoListener) - Method in interface org.mockito.MockitoFramework
Adds listener to Mockito.
addPreparedMocks(Set<Object>) - Method in class org.mockito.internal.configuration.injection.scanner.MockScanner
Add the scanned and prepared mock instance to the given collection.
addTo(Set<Field>) - Method in class org.mockito.internal.configuration.injection.scanner.InjectMocksScanner
Add the fields annotated by @InjectMocks
after(long) - Static method in class org.mockito.Mockito
Verification will be triggered after given amount of millis, allowing testing of async code.
After - Class in org.mockito.verification
See the javadoc for VerificationAfterDelay
After(long, VerificationMode) - Constructor for class org.mockito.verification.After
See the javadoc for VerificationAfterDelay
allDeclaredFieldsOf(Object) - Static method in class org.mockito.internal.util.reflection.Fields
Instance fields declared in the class and superclasses of the given instance.
AllInvocationsFinder - Class in org.mockito.internal.invocation.finder
 
and(boolean, boolean) - Static method in class org.mockito.AdditionalMatchers
boolean argument that matches both given matchers.
and(byte, byte) - Static method in class org.mockito.AdditionalMatchers
byte argument that matches both given argument matchers.
and(char, char) - Static method in class org.mockito.AdditionalMatchers
char argument that matches both given argument matchers.
and(double, double) - Static method in class org.mockito.AdditionalMatchers
double argument that matches both given argument matchers.
and(float, float) - Static method in class org.mockito.AdditionalMatchers
float argument that matches both given argument matchers.
and(int, int) - Static method in class org.mockito.AdditionalMatchers
int argument that matches both given argument matchers.
and(long, long) - Static method in class org.mockito.AdditionalMatchers
long argument that matches both given argument matchers.
and(short, short) - Static method in class org.mockito.AdditionalMatchers
short argument that matches both given argument matchers.
and(T, T) - Static method in class org.mockito.AdditionalMatchers
Object argument that matches both given argument matchers.
And - Class in org.mockito.internal.matchers
 
And(ArgumentMatcher<?>, ArgumentMatcher<?>) - Constructor for class org.mockito.internal.matchers.And
 
annotatedBy(Class<? extends Annotation>...) - Static method in class org.mockito.internal.util.reflection.Fields
Accept fields annotated by the given annotations.
annotation(Class<A>) - Method in class org.mockito.internal.util.reflection.InstanceField
Returns the annotation instance for the given annotation type.
AnnotationEngine - Interface in org.mockito.configuration
Deprecated.
Please use AnnotationEngine instead, this interface will probably be removed in mockito 3.
AnnotationEngine - Interface in org.mockito.plugins
Configures test via annotations.
answer(Answer1<T, A>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answer(Answer2<T, A, B>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answer(Answer3<T, A, B, C>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answer(Answer4<T, A, B, C, D>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answer(Answer5<T, A, B, C, D, E>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answer(InvocationOnMock) - Method in enum org.mockito.Answers
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.AnswersWithDelay
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.CallsRealMethods
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ClonesArguments
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.DoesNothing
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.Returns
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ReturnsArgumentAt
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ReturnsElementsOf
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ThrowsException
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.GloballyConfiguredAnswer
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.ReturnsMocks
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.ReturnsMoreEmptyValues
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.ReturnsSmartNulls
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.defaultanswers.TriesToReturnSelf
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
Answer<T> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer.
answer(InvocationOnMock) - Method in interface org.mockito.stubbing.Answer
 
answer(A0) - Method in interface org.mockito.stubbing.Answer1
 
answer(A0, A1) - Method in interface org.mockito.stubbing.Answer2
 
answer(A0, A1, A2) - Method in interface org.mockito.stubbing.Answer3
 
answer(A0, A1, A2, A3) - Method in interface org.mockito.stubbing.Answer4
 
answer(A0, A1, A2, A3, A4) - Method in interface org.mockito.stubbing.Answer5
 
answer(A0) - Method in interface org.mockito.stubbing.VoidAnswer1
 
answer(A0, A1) - Method in interface org.mockito.stubbing.VoidAnswer2
 
answer(A0, A1, A2) - Method in interface org.mockito.stubbing.VoidAnswer3
 
answer(A0, A1, A2, A3) - Method in interface org.mockito.stubbing.VoidAnswer4
 
answer(A0, A1, A2, A3, A4) - Method in interface org.mockito.stubbing.VoidAnswer5
 
Answer1<T,A0> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a single argument invocation.
Answer2<T,A0,A1> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a two argument invocation.
Answer3<T,A0,A1,A2> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a three argument invocation.
Answer4<T,A0,A1,A2,A3> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a four argument invocation.
Answer5<T,A0,A1,A2,A3,A4> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a five argument invocation.
AnswerFunctionalInterfaces - Class in org.mockito.internal.stubbing.answers
Functional interfaces to make it easy to implement answers in Java 8
Answers - Enum in org.mockito
Enumeration of pre-configured mock answers
answersWithDelay(long, Answer<T>) - Static method in class org.mockito.AdditionalAnswers
Returns an answer after a delay with a defined length.
AnswersWithDelay - Class in org.mockito.internal.stubbing.answers
Returns as the provided answer would return, after delaying the specified amount.
AnswersWithDelay(long, Answer<Object>) - Constructor for class org.mockito.internal.stubbing.answers.AnswersWithDelay
 
answerVoid(VoidAnswer1<A>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answerVoid(VoidAnswer2<A, B>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answerVoid(VoidAnswer3<A, B, C>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answerVoid(VoidAnswer4<A, B, C, D>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
answerVoid(VoidAnswer5<A, B, C, D, E>) - Static method in class org.mockito.AdditionalAnswers
Creates an answer from a functional interface - allows for a strongly typed answer to be created ideally in Java 8
any() - Static method in class org.mockito.ArgumentMatchers
Matches anything, including nulls and varargs.
any(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Matches any object of given type, excluding nulls.
Any - Class in org.mockito.internal.matchers
 
Any() - Constructor for class org.mockito.internal.matchers.Any
 
ANY - Static variable in class org.mockito.internal.matchers.Any
 
anyBoolean() - Static method in class org.mockito.ArgumentMatchers
Any boolean or non-null Boolean
anyByte() - Static method in class org.mockito.ArgumentMatchers
Any byte or non-null Byte.
anyChar() - Static method in class org.mockito.ArgumentMatchers
Any char or non-null Character.
anyCollection() - Static method in class org.mockito.ArgumentMatchers
Any non-null Collection.
anyCollectionOf(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
anyDouble() - Static method in class org.mockito.ArgumentMatchers
Any double or non-null Double.
anyFloat() - Static method in class org.mockito.ArgumentMatchers
Any float or non-null Float.
anyInt() - Static method in class org.mockito.ArgumentMatchers
Any int or non-null Integer.
anyIterable() - Static method in class org.mockito.ArgumentMatchers
Any non-null Iterable.
anyIterableOf(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
anyList() - Static method in class org.mockito.ArgumentMatchers
Any non-null List.
anyListOf(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
anyLong() - Static method in class org.mockito.ArgumentMatchers
Any long or non-null Long.
anyMap() - Static method in class org.mockito.ArgumentMatchers
Any non-null Map.
anyMapOf(Class<K>, Class<V>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
anyObject() - Static method in class org.mockito.ArgumentMatchers
Deprecated.
This will be removed in Mockito 3.0 (which will be java 8 only)
anySet() - Static method in class org.mockito.ArgumentMatchers
Any non-null Set.
anySetOf(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
anyShort() - Static method in class org.mockito.ArgumentMatchers
Any short or non-null Short.
anyString() - Static method in class org.mockito.ArgumentMatchers
Any non-null String
anyVararg() - Static method in class org.mockito.ArgumentMatchers
Deprecated.
as of 2.1.0 use ArgumentMatchers.any()
appendWarnings(Failure, String) - Method in class org.mockito.internal.junit.util.JUnitFailureHacker
Deprecated.
 
apply() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
apply(ArgumentMatcher<?>, Object) - Method in interface org.mockito.internal.invocation.ArgumentMatcherAction
Implementations must apply the given matcher to the argument and return true if the operation was successful or false if not.
apply(ArgumentMatcher, Object) - Method in class org.mockito.internal.invocation.TypeSafeMatching
 
apply(Statement, FrameworkMethod, Object) - Method in class org.mockito.internal.junit.JUnitRule
 
apply(Statement, Description) - Method in class org.mockito.internal.junit.VerificationCollectorImpl
 
approximateSize() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
Returns the approximate size of this map where the returned number is at least as big as the actual number of entries.
approximateSize() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 
approximateSize() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
Returns the approximate size of this set where the returned number is at least as big as the actual number of entries.
areEqual(Object, Object) - Static method in class org.mockito.internal.matchers.Equality
 
argThat(ArgumentMatcher<T>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom argument matchers.
argThat(Matcher<T>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Allows matching arguments with hamcrest matchers.
ArgumentCaptor<T> - Class in org.mockito
Use it to capture argument values for further assertions.
ArgumentMatcher<T> - Interface in org.mockito
Allows creating customized argument matchers.
ArgumentMatcherAction - Interface in org.mockito.internal.invocation
 
ArgumentMatchers - Class in org.mockito
Allow flexible verification or stubbing.
ArgumentMatchers() - Constructor for class org.mockito.ArgumentMatchers
 
ArgumentMatcherStorage - Interface in org.mockito.internal.progress
 
ArgumentMatcherStorageImpl - Class in org.mockito.internal.progress
 
ArgumentMatcherStorageImpl() - Constructor for class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
ArgumentMatchingTool - Class in org.mockito.internal.verification.argumentmatching
 
ArgumentsAreDifferent - Error in org.mockito.exceptions.verification
 
ArgumentsAreDifferent(String) - Constructor for error org.mockito.exceptions.verification.ArgumentsAreDifferent
 
ArgumentsAreDifferent - Error in org.mockito.exceptions.verification.junit
 
ArgumentsAreDifferent(String, String, String) - Constructor for error org.mockito.exceptions.verification.junit.ArgumentsAreDifferent
 
argumentsAreDifferent(String, String, Location) - Static method in class org.mockito.internal.exceptions.Reporter
 
ArgumentsProcessor - Class in org.mockito.internal.invocation
by Szczepan Faber, created at: 3/31/12
ArgumentsProcessor() - Constructor for class org.mockito.internal.invocation.ArgumentsProcessor
 
argumentsToMatchers(Object[]) - Static method in class org.mockito.internal.invocation.ArgumentsProcessor
 
ArrayEquals - Class in org.mockito.internal.matchers
 
ArrayEquals(Object) - Constructor for class org.mockito.internal.matchers.ArrayEquals
 
aryEq(T[]) - Static method in class org.mockito.AdditionalMatchers
Object array argument that is equal to the given array, i.e.
aryEq(short[]) - Static method in class org.mockito.AdditionalMatchers
short array argument that is equal to the given array, i.e.
aryEq(long[]) - Static method in class org.mockito.AdditionalMatchers
long array argument that is equal to the given array, i.e.
aryEq(int[]) - Static method in class org.mockito.AdditionalMatchers
int array argument that is equal to the given array, i.e.
aryEq(float[]) - Static method in class org.mockito.AdditionalMatchers
float array argument that is equal to the given array, i.e.
aryEq(double[]) - Static method in class org.mockito.AdditionalMatchers
double array argument that is equal to the given array, i.e.
aryEq(char[]) - Static method in class org.mockito.AdditionalMatchers
char array argument that is equal to the given array, i.e.
aryEq(byte[]) - Static method in class org.mockito.AdditionalMatchers
byte array argument that is equal to the given array, i.e.
aryEq(boolean[]) - Static method in class org.mockito.AdditionalMatchers
boolean array argument that is equal to the given array, i.e.
assertLazily() - Method in class org.mockito.internal.junit.VerificationCollectorImpl
 
assertLazily() - Method in interface org.mockito.junit.VerificationCollector
Enforce all verifications are performed lazily.
assignedValues() - Method in class org.mockito.internal.util.reflection.Fields.InstanceFields
 
AtLeast - Class in org.mockito.internal.verification
 
AtLeast(int) - Constructor for class org.mockito.internal.verification.AtLeast
 
atLeast(int) - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
atLeast(int) - Method in class org.mockito.internal.verification.VerificationWrapper
 
atLeast(int) - Static method in class org.mockito.Mockito
Allows at-least-x verification.
atLeast(int) - Method in interface org.mockito.verification.VerificationAfterDelay
Verifies that there is are least N invocations during the given period.
atLeast(int) - Method in interface org.mockito.verification.VerificationWithTimeout
Allows at-least-x verification within given timeout.
AtLeastDiscrepancy - Class in org.mockito.internal.verification.checkers
 
AtLeastDiscrepancy(int, int) - Constructor for class org.mockito.internal.verification.checkers.AtLeastDiscrepancy
 
atLeastOnce() - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
atLeastOnce() - Method in class org.mockito.internal.verification.VerificationWrapper
 
atLeastOnce() - Static method in class org.mockito.Mockito
Allows at-least-once verification.
atLeastOnce() - Method in interface org.mockito.verification.VerificationAfterDelay
Verifies that there is at least 1 invocation during the given period.
atLeastOnce() - Method in interface org.mockito.verification.VerificationWithTimeout
Allows at-least-once verification within given timeout.
AtLeastXNumberOfInvocationsChecker - Class in org.mockito.internal.verification.checkers
 
AtLeastXNumberOfInvocationsChecker() - Constructor for class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsChecker
 
AtMost - Class in org.mockito.internal.verification
 
AtMost(int) - Constructor for class org.mockito.internal.verification.AtMost
 
atMost(int) - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
atMost(int) - Method in class org.mockito.internal.verification.VerificationWrapper
 
atMost(int) - Static method in class org.mockito.Mockito
Allows at-most-x verification.
atMost(int) - Method in class org.mockito.verification.Timeout
 
atMost(int) - Method in interface org.mockito.verification.VerificationAfterDelay
Verifies that there is are most N invocations during the given period.
atMostAndNeverShouldNotBeUsedWithTimeout() - Static method in class org.mockito.internal.exceptions.Reporter
 
AutoCleanableListener - Interface in org.mockito.internal.listeners
Listener that is automatically cleaned up (removed from the the global list of subscribers).

B

BaseStubber - Interface in org.mockito.stubbing
Base interface for stubbing consecutive method calls with Mockito.doReturn(Object) syntax.
BaseStubbing<T> - Class in org.mockito.internal.stubbing
 
BDDMockito - Class in org.mockito
Behavior Driven Development style of writing tests uses //given //when //then comments as fundamental parts of your test methods.
BDDMockito() - Constructor for class org.mockito.BDDMockito
 
BDDMockito.BDDMyOngoingStubbing<T> - Interface in org.mockito
See original OngoingStubbing
BDDMockito.BDDStubber - Interface in org.mockito
See original Stubber
BDDMockito.Then<T> - Interface in org.mockito
Provides fluent way of mock verification.
BeanPropertySetter - Class in org.mockito.internal.util.reflection
This utility class will call the setter of the property to inject a new value.
BeanPropertySetter(Object, Field, boolean) - Constructor for class org.mockito.internal.util.reflection.BeanPropertySetter
New BeanPropertySetter
BeanPropertySetter(Object, Field) - Constructor for class org.mockito.internal.util.reflection.BeanPropertySetter
New BeanPropertySetter that don't report failure
bindMatchers(ArgumentMatcherStorage, Invocation) - Method in class org.mockito.internal.invocation.MatchersBinder
 
booleanThat(ArgumentMatcher<Boolean>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom boolean argument matchers.
booleanThat(Matcher<Boolean>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive boolean arguments.
build(Class<T>) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
build(Class<T>) - Method in interface org.mockito.MockSettings
Creates immutable view of mock settings used later by Mockito.
ByteBuddyMockMaker - Class in org.mockito.internal.creation.bytebuddy
ByteBuddy MockMaker.
ByteBuddyMockMaker() - Constructor for class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
 
BytecodeGenerator - Interface in org.mockito.internal.creation.bytebuddy
 
byteThat(ArgumentMatcher<Byte>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom byte argument matchers.
byteThat(Matcher<Byte>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive byte arguments.

C

call() - Method in interface org.mockito.invocation.InvocationFactory.RealMethodBehavior
 
callRealMethod() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
callRealMethod() - Method in interface org.mockito.invocation.InvocationOnMock
calls real method
Calls - Class in org.mockito.internal.verification
 
Calls(int) - Constructor for class org.mockito.internal.verification.Calls
 
calls(int) - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
calls(int) - Static method in class org.mockito.Mockito
Allows non-greedy verification in order.
CALLS_REAL_METHODS - Static variable in class org.mockito.Mockito
Optional Answer to be used with Mockito.mock(Class, Answer)
CallsRealMethods - Class in org.mockito.internal.stubbing.answers
Optional Answer that adds partial mocking support
CallsRealMethods() - Constructor for class org.mockito.internal.stubbing.answers.CallsRealMethods
 
cannotCallAbstractRealMethod() - Static method in class org.mockito.internal.exceptions.Reporter
 
cannotCreateTimerWithNegativeDurationTime(long) - Static method in class org.mockito.internal.exceptions.Reporter
 
cannotInitializeForInjectMocksAnnotation(String, String) - Static method in class org.mockito.internal.exceptions.Reporter
 
cannotInitializeForSpyAnnotation(String, Exception) - Static method in class org.mockito.internal.exceptions.Reporter
 
cannotInjectDependency(Field, Object, Exception) - Static method in class org.mockito.internal.exceptions.Reporter
 
cannotMockClass(Class<?>, String) - Static method in class org.mockito.internal.exceptions.Reporter
 
cannotStubVoidMethodWithAReturnValue(String) - Static method in class org.mockito.internal.exceptions.Reporter
 
CannotStubVoidMethodWithReturnValue - Exception in org.mockito.exceptions.misusing
 
CannotStubVoidMethodWithReturnValue(String) - Constructor for exception org.mockito.exceptions.misusing.CannotStubVoidMethodWithReturnValue
 
cannotStubWithNullThrowable() - Static method in class org.mockito.internal.exceptions.Reporter
 
CannotVerifyStubOnlyMock - Exception in org.mockito.exceptions.misusing
 
CannotVerifyStubOnlyMock(String) - Constructor for exception org.mockito.exceptions.misusing.CannotVerifyStubOnlyMock
 
cannotVerifyToString() - Static method in class org.mockito.internal.exceptions.Reporter
 
canRecoverFromFailure(VerificationMode) - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
Captor - Annotation Type in org.mockito
Allows shorthand ArgumentCaptor creation on fields.
CaptorAnnotationProcessor - Class in org.mockito.internal.configuration
Instantiate ArgumentCaptor a field annotated by @Captor.
CaptorAnnotationProcessor() - Constructor for class org.mockito.internal.configuration.CaptorAnnotationProcessor
 
capture() - Method in class org.mockito.ArgumentCaptor
Use it to capture the argument.
captureArgumentsFrom(Invocation) - Method in class org.mockito.internal.invocation.InvocationMatcher
 
captureArgumentsFrom(Invocation) - Method in interface org.mockito.invocation.MatchableInvocation
This method is used by Mockito to implement argument captor functionality (see ArgumentCaptor.
captureFrom(Object) - Method in interface org.mockito.internal.matchers.CapturesArguments
 
captureFrom(Object) - Method in class org.mockito.internal.matchers.CapturingMatcher
 
CapturesArguments - Interface in org.mockito.internal.matchers
 
CapturingMatcher<T> - Class in org.mockito.internal.matchers
 
CapturingMatcher() - Constructor for class org.mockito.internal.matchers.CapturingMatcher
 
charThat(ArgumentMatcher<Character>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom char argument matchers.
charThat(Matcher<Character>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive char arguments.
checkAtLeastNumberOfInvocations(List<Invocation>, MatchableInvocation, int) - Static method in class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsChecker
 
checkAtLeastNumberOfInvocations(List<Invocation>, MatchableInvocation, int, InOrderContext) - Static method in class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsChecker
 
checkedExceptionInvalid(Throwable) - Static method in class org.mockito.internal.exceptions.Reporter
 
checkItemsNotNull(T, String) - Static method in class org.mockito.internal.util.Checks
 
checkMissingInvocation(List<Invocation>, MatchableInvocation) - Static method in class org.mockito.internal.verification.checkers.MissingInvocationChecker
 
checkMissingInvocation(List<Invocation>, MatchableInvocation, InOrderContext) - Static method in class org.mockito.internal.verification.checkers.MissingInvocationChecker
 
checkNotNull(T, String) - Static method in class org.mockito.internal.util.Checks
 
checkNotNull(T, String, String) - Static method in class org.mockito.internal.util.Checks
 
checkNumberOfInvocations(List<Invocation>, MatchableInvocation, int) - Static method in class org.mockito.internal.verification.checkers.NumberOfInvocationsChecker
 
checkNumberOfInvocations(List<Invocation>, MatchableInvocation, int, InOrderContext) - Static method in class org.mockito.internal.verification.checkers.NumberOfInvocationsChecker
 
checkNumberOfInvocationsNonGreedy(List<Invocation>, MatchableInvocation, int, InOrderContext) - Static method in class org.mockito.internal.verification.checkers.NumberOfInvocationsChecker
 
CheckReturnValue - Annotation Type in org.mockito
This annotation is not supposed to be used by Mockito end-users.
Checks - Class in org.mockito.internal.util
Pre-made preconditions
Checks() - Constructor for class org.mockito.internal.util.Checks
 
ClassPathLoader - Class in org.mockito.internal.configuration
Loads configuration or extension points available in the classpath.
ClassPathLoader() - Constructor for class org.mockito.internal.configuration.ClassPathLoader
 
cleansStackTrace() - Method in class org.mockito.configuration.DefaultMockitoConfiguration
 
cleansStackTrace() - Method in interface org.mockito.configuration.IMockitoConfiguration
This should be turned on unless you're a Mockito developer and you wish to have verbose (read: messy) stack traces that only few understand (eg: Mockito developers)
cleansStackTrace() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
clear() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
clear() - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
clear() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
Clears the entire map.
clear() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
Clears the set.
clear() - Method in class org.mockito.internal.verification.DefaultRegisteredInvocations
 
clear() - Method in interface org.mockito.internal.verification.RegisteredInvocations
 
clear() - Method in class org.mockito.internal.verification.SingleRegisteredInvocation
 
clearAll() - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
Clears all thread local references for all threads.
clearInvocations(T...) - Method in class org.mockito.internal.MockitoCore
 
clearInvocations() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
clearInvocations(T...) - Static method in class org.mockito.Mockito
Use this method in order to only clear invocations, when stubbing is non-trivial.
clearListeners() - Method in interface org.mockito.internal.progress.MockingProgress
Removes all listeners added via MockingProgress.addListener(MockitoListener).
clearListeners() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
clone() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
ClonesArguments - Class in org.mockito.internal.stubbing.answers
 
ClonesArguments() - Constructor for class org.mockito.internal.stubbing.answers.ClonesArguments
 
close(Closeable) - Static method in class org.mockito.internal.util.io.IOUtil
Closes the target.
closeQuietly(Closeable) - Static method in class org.mockito.internal.util.io.IOUtil
Closes the target.
cmpEq(T) - Static method in class org.mockito.AdditionalMatchers
comparable argument equals to the given value according to their compareTo method.
collectAndReport() - Method in class org.mockito.internal.junit.VerificationCollectorImpl
 
collectAndReport() - Method in interface org.mockito.junit.VerificationCollector
Collect all lazily verified behaviour.
collector() - Static method in class org.mockito.junit.MockitoJUnit
Creates a rule instance that can perform lazy verifications.
compare(Invocation, Invocation) - Method in class org.mockito.internal.invocation.InvocationComparator
 
compare(Stubbing, Stubbing) - Method in class org.mockito.internal.stubbing.StubbingComparator
 
CompareEqual<T extends Comparable<T>> - Class in org.mockito.internal.matchers
 
CompareEqual(T) - Constructor for class org.mockito.internal.matchers.CompareEqual
 
CompareTo<T extends Comparable<T>> - Class in org.mockito.internal.matchers
 
CompareTo(T) - Constructor for class org.mockito.internal.matchers.CompareTo
 
ConditionalStackTraceFilter - Class in org.mockito.internal.exceptions.stacktrace
 
ConditionalStackTraceFilter() - Constructor for class org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter
 
ConsecutiveStubbing<T> - Class in org.mockito.internal.stubbing
 
ConsoleMockitoLogger - Class in org.mockito.internal.util
 
ConsoleMockitoLogger() - Constructor for class org.mockito.internal.util.ConsoleMockitoLogger
 
ConsoleSpammingMockitoJUnitRunner - Class in org.mockito.runners
Deprecated.
as of 2.1.0. Use the MockitoJUnitRunner runner instead which contains support for detecting unused stubs.

If you still prefer using this runner, tell us why (create ticket in our issue tracker).

ConsoleSpammingMockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
Deprecated.
 
ConstructorInjection - Class in org.mockito.internal.configuration.injection
Injection strategy based on constructor.
ConstructorInjection() - Constructor for class org.mockito.internal.configuration.injection.ConstructorInjection
 
ConstructorInstantiator - Class in org.mockito.internal.creation.instance
 
ConstructorInstantiator(boolean, Object...) - Constructor for class org.mockito.internal.creation.instance.ConstructorInstantiator
 
contains(String) - Static method in class org.mockito.ArgumentMatchers
String argument that contains the given substring.
Contains - Class in org.mockito.internal.matchers
 
Contains(String) - Constructor for class org.mockito.internal.matchers.Contains
 
contains(Object) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
contains(Object) - Method in class org.mockito.internal.util.collections.IdentitySet
 
contains(V) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
 
containsAll(Collection<?>) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
ContainsExtraTypeInfo - Interface in org.mockito.internal.matchers
Intended to use in certain ArgumentMatchers.
containsKey(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
containsKey(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 
contextualActualTypeParameters - Variable in class org.mockito.internal.util.reflection.GenericMetadataSupport
Represents actual type variables resolved for current class.
convert(Collection<From>, ListUtil.Converter<From, To>) - Static method in class org.mockito.internal.util.collections.ListUtil
 
convert(From) - Method in interface org.mockito.internal.util.collections.ListUtil.Converter
 
copySelfWithNewVerificationMode(VerificationMode) - Method in class org.mockito.internal.verification.VerificationWrapper
 
copySelfWithNewVerificationMode(VerificationMode) - Method in class org.mockito.verification.After
 
copySelfWithNewVerificationMode(VerificationMode) - Method in class org.mockito.verification.Timeout
 
copyToMock(T, T) - Method in class org.mockito.internal.util.reflection.LenientCopyTool
 
copyToRealObject(T, T) - Method in class org.mockito.internal.util.reflection.LenientCopyTool
 
copyValue(T, T, Field) - Method in class org.mockito.internal.util.reflection.FieldCopier
 
copyWithVerificationMode(VerificationMode) - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
create(Class<?>) - Method in class org.mockito.internal.runners.RunnerFactory
Creates silent runner implementation
create(Class<?>, Supplier<MockitoTestListener>) - Method in class org.mockito.internal.runners.RunnerFactory
Creates runner implementation with provided listener supplier
createArgumentsAreDifferentException(String, String, String) - Static method in class org.mockito.internal.junit.ExceptionFactory
If JUnit is used, an AssertionError is returned that extends from JUnit ComparisonFailure and hence provide a better IDE support as the comparison result is comparable
createFrom(List<Invocation>) - Static method in class org.mockito.internal.invocation.InvocationMatcher
 
createInvocation(Object, MockCreationSettings, Method, Callable, Object...) - Method in class org.mockito.internal.invocation.DefaultInvocationFactory
 
createInvocation(Object, MockCreationSettings, Method, InvocationFactory.RealMethodBehavior, Object...) - Method in class org.mockito.internal.invocation.DefaultInvocationFactory
 
createInvocation(Object, Method, Object[], RealMethod, MockCreationSettings, Location) - Static method in class org.mockito.internal.invocation.DefaultInvocationFactory
 
createInvocation(Object, MockCreationSettings, Method, Callable, Object...) - Method in interface org.mockito.invocation.InvocationFactory
Deprecated.
Use InvocationFactory.createInvocation(Object, MockCreationSettings, Method, RealMethodBehavior, Object...) instead. Why deprecated? We found use cases where we need to handle Throwable and ensure correct stack trace filtering (removing Mockito internals from the stack trace). Hence the introduction of InvocationFactory.RealMethodBehavior. Creates instance of an Invocation object. This method is useful for framework integrators to programmatically simulate method calls on mocks using MockHandler. It enables advanced framework integrations.
createInvocation(Object, MockCreationSettings, Method, InvocationFactory.RealMethodBehavior, Object...) - Method in interface org.mockito.invocation.InvocationFactory
Creates instance of an Invocation object.
createMock(MockCreationSettings<T>, MockHandler) - Method in class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
 
createMock(MockCreationSettings<T>, MockHandler) - Method in class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
 
createMock(MockCreationSettings<T>, MockHandler) - Method in class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
createMock(MockCreationSettings<T>) - Static method in class org.mockito.internal.util.MockUtil
 
createMock(MockCreationSettings<T>, MockHandler) - Method in interface org.mockito.plugins.MockMaker
If you want to provide your own implementation of MockMaker this method should: Create a proxy object that implements settings.typeToMock and potentially also settings.extraInterfaces. You may use the information from settings to create/configure your proxy object. Your proxy object should carry the handler with it.
createMockHandler(MockCreationSettings<T>) - Static method in class org.mockito.internal.handler.MockHandlerFactory
 
createMockType(MockCreationSettings<T>) - Method in class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
 
createMockType(MockCreationSettings<T>) - Method in class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
 
createMockType(MockCreationSettings<T>) - Method in class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
createObjectArray(Object) - Static method in class org.mockito.internal.matchers.ArrayEquals
 
createStrict(Class<?>) - Method in class org.mockito.internal.runners.RunnerFactory
Creates strict runner implementation
createStrictStubs(Class<?>) - Method in class org.mockito.internal.runners.RunnerFactory
Creates strict stubs runner implementation TODO, let's try to apply Brice suggestion and use switch + Strictness
CreationSettings<T> - Class in org.mockito.internal.creation.settings
 
CreationSettings() - Constructor for class org.mockito.internal.creation.settings.CreationSettings
 
CreationSettings(CreationSettings) - Constructor for class org.mockito.internal.creation.settings.CreationSettings
 

D

decamelizeMatcher(String) - Static method in class org.mockito.internal.util.StringUtil
 
declaredFieldsOf(Object) - Static method in class org.mockito.internal.util.reflection.Fields
Instance fields declared in the class of the given instance.
defaultAnswer(Answer) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
defaultAnswer - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
defaultAnswer(Answer) - Method in interface org.mockito.MockSettings
Specifies default answers to interactions.
defaultAnswerDoesNotAcceptNullParameter() - Static method in class org.mockito.internal.exceptions.Reporter
 
DefaultAnswerValidator - Class in org.mockito.internal.stubbing.answers
 
DefaultAnswerValidator() - Constructor for class org.mockito.internal.stubbing.answers.DefaultAnswerValidator
 
DefaultInjectionEngine - Class in org.mockito.internal.configuration
Inject mock/spies dependencies for fields annotated with @InjectMocks

See MockitoAnnotations

DefaultInjectionEngine() - Constructor for class org.mockito.internal.configuration.DefaultInjectionEngine
 
DefaultInstantiatorProvider - Class in org.mockito.internal.creation.instance
 
DefaultInstantiatorProvider() - Constructor for class org.mockito.internal.creation.instance.DefaultInstantiatorProvider
 
DefaultInternalRunner - Class in org.mockito.internal.runners
 
DefaultInternalRunner(Class<?>, Supplier<MockitoTestListener>) - Constructor for class org.mockito.internal.runners.DefaultInternalRunner
 
DefaultInvocationFactory - Class in org.mockito.internal.invocation
 
DefaultInvocationFactory() - Constructor for class org.mockito.internal.invocation.DefaultInvocationFactory
 
DefaultLenientStubber - Class in org.mockito.internal.stubbing
 
DefaultLenientStubber() - Constructor for class org.mockito.internal.stubbing.DefaultLenientStubber
 
DefaultMockingDetails - Class in org.mockito.internal.util
Class to inspect any object, and identify whether a particular object is either a mock or a spy.
DefaultMockingDetails(Object) - Constructor for class org.mockito.internal.util.DefaultMockingDetails
 
DefaultMockitoConfiguration - Class in org.mockito.configuration
DefaultConfiguration of Mockito framework
DefaultMockitoConfiguration() - Constructor for class org.mockito.configuration.DefaultMockitoConfiguration
 
DefaultMockitoFramework - Class in org.mockito.internal.framework
 
DefaultMockitoFramework() - Constructor for class org.mockito.internal.framework.DefaultMockitoFramework
 
DefaultMockitoSession - Class in org.mockito.internal.framework
 
DefaultMockitoSession(List<Object>, String, Strictness, MockitoLogger) - Constructor for class org.mockito.internal.framework.DefaultMockitoSession
 
DefaultMockitoSessionBuilder - Class in org.mockito.internal.session
 
DefaultMockitoSessionBuilder() - Constructor for class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
DefaultRegisteredInvocations - Class in org.mockito.internal.verification
 
DefaultRegisteredInvocations() - Constructor for class org.mockito.internal.verification.DefaultRegisteredInvocations
 
DefaultStackTraceCleaner - Class in org.mockito.internal.exceptions.stacktrace
This predicate is used to filter "good" StackTraceElement.
DefaultStackTraceCleaner() - Constructor for class org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner
 
DefaultStackTraceCleanerProvider - Class in org.mockito.internal.exceptions.stacktrace
by Szczepan Faber, created at: 7/29/12
DefaultStackTraceCleanerProvider() - Constructor for class org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleanerProvider
 
DefaultTestFinishedEvent - Class in org.mockito.internal.junit
 
DefaultTestFinishedEvent(Object, String, Throwable) - Constructor for class org.mockito.internal.junit.DefaultTestFinishedEvent
 
defaultValue(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
Creates a default value.
defaultValue(Class<T>) - Static method in class org.mockito.internal.util.Primitives
Returns the boxed default value for a primitive or a primitive wrapper.
define(Thread, T) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
delegatedMethodDoesNotExistOnDelegate(Method, Object, Object) - Static method in class org.mockito.internal.exceptions.Reporter
 
delegatedMethodHasWrongReturnType(Method, Method, Object, Object) - Static method in class org.mockito.internal.exceptions.Reporter
 
delegatesTo(Object) - Static method in class org.mockito.AdditionalAnswers
An answer that directly forwards the calls to the delegate.
DelegatingMethod - Class in org.mockito.internal.creation
 
DelegatingMethod(Method) - Constructor for class org.mockito.internal.creation.DelegatingMethod
 
describe() - Static method in class org.mockito.internal.util.Platform
 
DescribedInvocation - Interface in org.mockito.invocation
Provides information about the invocation, specifically a human readable description and the location.
description(String) - Method in class org.mockito.internal.verification.AtLeast
 
description(String) - Method in class org.mockito.internal.verification.AtMost
 
description(String) - Method in class org.mockito.internal.verification.Calls
 
Description - Class in org.mockito.internal.verification
Description verification mode wraps an existing verification mode and prepends a custom message to the assertion error if verification fails.
Description(VerificationMode, String) - Constructor for class org.mockito.internal.verification.Description
Constructs a verification mode which wraps the given verification mode.
description(String) - Method in class org.mockito.internal.verification.Description
 
description(String) - Method in class org.mockito.internal.verification.InOrderWrapper
 
description(String) - Method in class org.mockito.internal.verification.MockAwareVerificationMode
 
description(String) - Method in class org.mockito.internal.verification.NoMoreInteractions
 
description(String) - Method in class org.mockito.internal.verification.Only
 
description(String) - Method in class org.mockito.internal.verification.Times
 
description(VerificationMode, String) - Static method in class org.mockito.internal.verification.VerificationModeFactory
Verification mode will prepend the specified failure message if verification fails with the given implementation.
description(String) - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
description(String) - Method in class org.mockito.internal.verification.VerificationWrapperInOrderWrapper
 
description(String) - Static method in class org.mockito.Mockito
Adds a description to be printed if verification fails.
description(String) - Method in class org.mockito.verification.After
 
description(String) - Method in class org.mockito.verification.Timeout
 
description(String) - Method in interface org.mockito.verification.VerificationMode
Description will be prepended to the assertion error if verification fails.
DetachedThreadLocal<T> - Class in org.mockito.internal.util.concurrent
A detached local that allows for explicit control of setting and removing values from a thread-local context.
DetachedThreadLocal(DetachedThreadLocal.Cleaner) - Constructor for class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
DetachedThreadLocal.Cleaner - Enum in org.mockito.internal.util.concurrent
Determines the cleaning format.
determineStrictness(Stubbing, MockCreationSettings, Strictness) - Static method in class org.mockito.internal.stubbing.StrictnessSelector
Determines the actual strictness in the following importance order: 1st - strictness configured when declaring stubbing; 2nd - strictness configured at mock level; 3rd - strictness configured at test level (rule, mockito session)
Discrepancy - Class in org.mockito.internal.reporting
 
Discrepancy(int, int) - Constructor for class org.mockito.internal.reporting.Discrepancy
 
DispatcherDefaultingToRealMethod() - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.DispatcherDefaultingToRealMethod
 
doAnswer(Answer) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doAnswer(Answer) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doAnswer(Answer) - Static method in class org.mockito.Mockito
Use doAnswer() when you want to stub a void method with generic Answer.
doAnswer(Answer) - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doAnswer(Answer) style:

   doAnswer(answerOne).
doCallRealMethod() - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doCallRealMethod() - Method in class org.mockito.internal.stubbing.StubberImpl
 
doCallRealMethod() - Static method in class org.mockito.Mockito
Use doCallRealMethod() when you want to call the real implementation of a method.
doCallRealMethod() - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doCallRealMethod() style.
DoesNothing - Class in org.mockito.internal.stubbing.answers
 
doesNothing() - Static method in class org.mockito.internal.stubbing.answers.DoesNothing
 
doIdentityEquals(Object, Object) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.ForEquals
 
doIdentityHashCode(Object) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.ForHashCode
 
doNothing() - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doNothing() - Method in class org.mockito.internal.stubbing.StubberImpl
 
doNothing() - Static method in class org.mockito.Mockito
Use doNothing() for setting void methods to do nothing.
doNothing() - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doNothing() style:

   doNothing().
doReadObject(String, MockAccess, ObjectInputStream) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodAdvice.ForReadObject
 
doReturn(Object) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doReturn(Object, Object...) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doReturn(Object) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doReturn(Object, Object...) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doReturn(Object) - Static method in class org.mockito.Mockito
Use doReturn() in those rare occasions when you cannot use Mockito.when(Object).
doReturn(Object, Object...) - Static method in class org.mockito.Mockito
Same as Mockito.doReturn(Object) but sets consecutive values to be returned.
doReturn(Object) - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doReturn(Object) style.
doReturn(Object, Object...) - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doReturn(Object) style.
doThrow(Throwable...) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doThrow(Class<? extends Throwable>) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
doThrow(Throwable...) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doThrow(Class<? extends Throwable>) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doThrow(Throwable...) - Static method in class org.mockito.Mockito
Use doThrow() when you want to stub the void method with an exception.
doThrow(Class<? extends Throwable>) - Static method in class org.mockito.Mockito
Use doThrow() when you want to stub the void method with an exception.
doThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Static method in class org.mockito.Mockito
Same as Mockito.doThrow(Class) but sets consecutive exception classes to be thrown.
doThrow(Throwable...) - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doThrow(Throwable[]) style:

   doThrow(new RuntimeException("one")).
doThrow(Class<? extends Throwable>) - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doThrow(Class) style:

   doThrow(RuntimeException.class).
doThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in interface org.mockito.stubbing.BaseStubber
Use it for stubbing consecutive calls in Mockito.doThrow(Class) style:

   doThrow(RuntimeException.class).
doubleThat(ArgumentMatcher<Double>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom double argument matchers.
doubleThat(Matcher<Double>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive double arguments.
doWriteReplace(MockAccess) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.ForWriteReplace
 
duration() - Method in class org.mockito.internal.util.Timer
 

E

emptyDoubleStream() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty DoubleStream using reflection to stay backwards-compatible with older JDKs.
emptyIntStream() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty IntStream using reflection to stay backwards-compatible with older JDKs.
emptyLongStream() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty LongStream using reflection to stay backwards-compatible with older JDKs.
emptyOptional() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty Optional using reflection to stay backwards-compatible with older JDKs.
emptyOptionalDouble() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty OptionalDouble using reflection to stay backwards-compatible with older JDKs.
emptyOptionalInt() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty OptionalInt using reflection to stay backwards-compatible with older JDKs.
emptyOptionalLong() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty OptionalLong using reflection to stay backwards-compatible with older JDKs.
emptyStream() - Static method in class org.mockito.internal.util.JavaEightUtil
Creates an empty Stream using reflection to stay backwards-compatible with older JDKs.
enableAccess(AccessibleObject) - Method in class org.mockito.internal.util.reflection.AccessibilityChanger
changes the accessibleObject accessibility and returns true if accessibility was changed
enableClassCache() - Method in class org.mockito.configuration.DefaultMockitoConfiguration
 
enableClassCache() - Method in interface org.mockito.configuration.IMockitoConfiguration
Allow objenesis to cache classes.
enableClassCache() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
endsWith(String) - Static method in class org.mockito.ArgumentMatchers
String argument that ends with the given suffix.
EndsWith - Class in org.mockito.internal.matchers
 
EndsWith(String) - Constructor for class org.mockito.internal.matchers.EndsWith
 
eq(double, double) - Static method in class org.mockito.AdditionalMatchers
double argument that has an absolute difference to the given value that is less than the given delta details.
eq(float, float) - Static method in class org.mockito.AdditionalMatchers
float argument that has an absolute difference to the given value that is less than the given delta details.
eq(boolean) - Static method in class org.mockito.ArgumentMatchers
boolean argument that is equal to the given value.
eq(byte) - Static method in class org.mockito.ArgumentMatchers
byte argument that is equal to the given value.
eq(char) - Static method in class org.mockito.ArgumentMatchers
char argument that is equal to the given value.
eq(double) - Static method in class org.mockito.ArgumentMatchers
double argument that is equal to the given value.
eq(float) - Static method in class org.mockito.ArgumentMatchers
float argument that is equal to the given value.
eq(int) - Static method in class org.mockito.ArgumentMatchers
int argument that is equal to the given value.
eq(long) - Static method in class org.mockito.ArgumentMatchers
long argument that is equal to the given value.
eq(short) - Static method in class org.mockito.ArgumentMatchers
short argument that is equal to the given value.
eq(T) - Static method in class org.mockito.ArgumentMatchers
Object argument that is equal to the given value.
Equality - Class in org.mockito.internal.matchers
 
Equality() - Constructor for class org.mockito.internal.matchers.Equality
 
equals(Object) - Method in class org.mockito.internal.creation.DelegatingMethod
 
equals(Object) - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
equals(Object) - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
equals(Object) - Method in class org.mockito.internal.invocation.SerializableMethod
 
Equals - Class in org.mockito.internal.matchers
 
Equals(Object) - Constructor for class org.mockito.internal.matchers.Equals
 
equals(Object) - Method in class org.mockito.internal.matchers.Equals
 
equals(Object) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper
 
equals(Object) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
equals(Object) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
 
equals(Object) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
equals(Object) - Method in class org.mockito.internal.util.reflection.InstanceField
 
EqualsWithDelta - Class in org.mockito.internal.matchers
 
EqualsWithDelta(Number, Number) - Constructor for class org.mockito.internal.matchers.EqualsWithDelta
 
ExceptionFactory - Class in org.mockito.internal.junit
 
ExceptionIncludingMockitoWarnings - Exception in org.mockito.internal.exceptions
 
ExceptionIncludingMockitoWarnings(String, Throwable) - Constructor for exception org.mockito.internal.exceptions.ExceptionIncludingMockitoWarnings
 
expandArgs(MockitoMethod, Object[]) - Static method in class org.mockito.internal.invocation.ArgumentsProcessor
 
expungeStaleEntries() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
Cleans all unused references.
expungeStaleEntries() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
Cleans all unused references.
extractRawTypeOf(Type) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
extraInterfaces(Class<?>...) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
extraInterfaces - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
extraInterfaces() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
extraInterfaces(Class<?>...) - Method in interface org.mockito.MockSettings
Specifies extra interfaces the mock should implement.
extraInterfacesAcceptsOnlyInterfaces(Class<?>) - Static method in class org.mockito.internal.exceptions.Reporter
 
extraInterfacesCannotContainMockedType(Class<?>) - Static method in class org.mockito.internal.exceptions.Reporter
 
extraInterfacesDoesNotAcceptNullParameters() - Static method in class org.mockito.internal.exceptions.Reporter
 
extraInterfacesRequiresAtLeastOneInterface() - Static method in class org.mockito.internal.exceptions.Reporter
 
extraTypeInfoFor(int) - Method in class org.mockito.internal.reporting.PrintSettings
 

F

FailureDetector - Class in org.mockito.internal.runners.util
Implementation of JUnit run listener that knows when any of the tests failed
FailureDetector() - Constructor for class org.mockito.internal.runners.util.FailureDetector
 
fetchFrom(Thread) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
FieldAnnotationProcessor<A extends Annotation> - Interface in org.mockito.internal.configuration
Simple annotation processor interface.
fieldClass() - Method in class org.mockito.internal.util.reflection.FieldInitializationReport
Returns the class of the actual instance in the field.
FieldCopier - Class in org.mockito.internal.util.reflection
 
FieldCopier() - Constructor for class org.mockito.internal.util.reflection.FieldCopier
 
fieldInitialisationThrewException(Field, Throwable) - Static method in class org.mockito.internal.exceptions.Reporter
 
FieldInitializationReport - Class in org.mockito.internal.util.reflection
Report on field initialization
FieldInitializationReport(Object, boolean, boolean) - Constructor for class org.mockito.internal.util.reflection.FieldInitializationReport
 
FieldInitializer - Class in org.mockito.internal.util.reflection
Initialize a field with type instance if a default constructor can be found.
FieldInitializer(Object, Field) - Constructor for class org.mockito.internal.util.reflection.FieldInitializer
Prepare initializer with the given field on the given instance.
FieldInitializer(Object, Field, FieldInitializer.ConstructorArgumentResolver) - Constructor for class org.mockito.internal.util.reflection.FieldInitializer
Prepare initializer with the given field on the given instance.
FieldInitializer.ConstructorArgumentResolver - Interface in org.mockito.internal.util.reflection
Represents the strategy used to resolve actual instances to be given to a constructor given the argument types.
fieldInstance() - Method in class org.mockito.internal.util.reflection.FieldInitializationReport
Returns the actual field instance.
FieldReader - Class in org.mockito.internal.util.reflection
 
FieldReader(Object, Field) - Constructor for class org.mockito.internal.util.reflection.FieldReader
 
Fields - Class in org.mockito.internal.util.reflection
Small fluent reflection tools to work with fields.
Fields() - Constructor for class org.mockito.internal.util.reflection.Fields
 
Fields.InstanceFields - Class in org.mockito.internal.util.reflection
 
FieldSetter - Class in org.mockito.internal.util.reflection
 
fieldWasInitialized() - Method in class org.mockito.internal.util.reflection.FieldInitializationReport
Indicate whether the field was created during the process or not.
fieldWasInitializedUsingContructorArgs() - Method in class org.mockito.internal.util.reflection.FieldInitializationReport
Indicate whether the field was created using constructor args.
filter(Throwable) - Method in class org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter
 
filter(StackTraceElement[], boolean) - Method in class org.mockito.internal.exceptions.stacktrace.StackTraceFilter
Example how the filter works (+/- means good/bad): [a+, b+, c-, d+, e+, f-, g+] -> [a+, b+, d+, e+, g+] Basically removes all bad from the middle.
filter(Filter) - Method in class org.mockito.internal.runners.DefaultInternalRunner
 
filter(Filter) - Method in class org.mockito.internal.runners.StrictRunner
 
filter(Collection<T>, ListUtil.Filter<T>) - Static method in class org.mockito.internal.util.collections.ListUtil
 
filter(ListUtil.Filter<InstanceField>) - Method in class org.mockito.internal.util.reflection.Fields.InstanceFields
 
filter(Filter) - Method in class org.mockito.junit.MockitoJUnitRunner
 
filter(Filter) - Method in class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
Deprecated.
 
filter(Filter) - Method in class org.mockito.runners.MockitoJUnitRunner
Deprecated.
filter(Filter) - Method in class org.mockito.runners.VerboseMockitoJUnitRunner
Deprecated.
 
filterCandidate(Collection<Object>, Field, List<Field>, Object) - Method in interface org.mockito.internal.configuration.injection.filter.MockCandidateFilter
 
filterCandidate(Collection<Object>, Field, List<Field>, Object) - Method in class org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter
 
filterCandidate(Collection<Object>, Field, List<Field>, Object) - Method in class org.mockito.internal.configuration.injection.filter.TerminalMockCandidateFilter
 
filterCandidate(Collection<Object>, Field, List<Field>, Object) - Method in class org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter
 
find(String) - Static method in class org.mockito.AdditionalMatchers
String argument that contains a substring that matches the given regular expression.
find(FindingsListener) - Method in class org.mockito.internal.debugging.WarningsFinder
 
find(Iterable<?>) - Static method in class org.mockito.internal.invocation.finder.AllInvocationsFinder
gets all invocations from mocks.
find(List<?>) - Static method in class org.mockito.internal.invocation.finder.VerifiableInvocationsFinder
 
find(List<?>) - Method in class org.mockito.internal.invocation.UnusedStubsFinder
Deprecated.
Finds all unused stubs for given mocks
Find - Class in org.mockito.internal.matchers
 
Find(String) - Constructor for class org.mockito.internal.matchers.Find
 
findAllMatchingUnverifiedChunks(List<Invocation>, MatchableInvocation, InOrderContext) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
findAnswerFor(Invocation) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
findFirstMatchingUnverifiedInvocation(List<Invocation>, MatchableInvocation, InOrderContext) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
findFirstUnverified(List<Invocation>) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
findFirstUnverifiedInOrder(InOrderContext, List<Invocation>) - Static method in class org.mockito.internal.invocation.InvocationsFinder
i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v v
FindingsListener - Interface in org.mockito.internal.debugging
 
findInvocations(List<Invocation>, MatchableInvocation) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
findMatchingChunk(List<Invocation>, MatchableInvocation, int, InOrderContext) - Static method in class org.mockito.internal.invocation.InvocationsFinder
some examples how it works: Given invocations sequence: 1,1,2,1 if wanted is 1 and mode is times(2) then returns 1,1 if wanted is 1 and mode is atLeast() then returns 1,1,1 if wanted is 1 and mode is times(x), where x != 2 then returns 1,1,1
findPreviousVerifiedInOrder(List<Invocation>, InOrderContext) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
findSimilarInvocation(List<Invocation>, MatchableInvocation) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
findSourceFile(StackTraceElement[], String) - Method in class org.mockito.internal.exceptions.stacktrace.StackTraceFilter
Finds the source file of the target stack trace.
findStubbings(Iterable<?>) - Static method in class org.mockito.internal.invocation.finder.AllInvocationsFinder
Gets all stubbings from mocks.
finishMocking() - Method in class org.mockito.internal.framework.DefaultMockitoSession
 
finishMocking(Throwable) - Method in class org.mockito.internal.framework.DefaultMockitoSession
 
finishMocking() - Method in interface org.mockito.MockitoSession
Must be invoked when the user is done with mocking for given session (test method).
finishMocking(Throwable) - Method in interface org.mockito.MockitoSession
Must be invoked when the user is done with mocking for given session (test method).
firstBound() - Method in interface org.mockito.internal.util.reflection.GenericMetadataSupport.BoundedType
 
firstBound() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
 
firstBound() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
firstOf(Iterable<T>) - Static method in class org.mockito.internal.util.collections.Iterables
Returns first element of provided iterable or fails fast when iterable is empty.
floatThat(ArgumentMatcher<Float>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom float argument matchers.
floatThat(Matcher<Float>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive float arguments.
forClass(Class<S>) - Static method in class org.mockito.ArgumentCaptor
Build a new ArgumentCaptor.
forEachMatcherAndArgument(ArgumentMatcherAction) - Method in class org.mockito.internal.invocation.MatcherApplicationStrategy
Applies the given ArgumentMatcherAction to all arguments and corresponding matchers
ForEquals() - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.ForEquals
 
ForHashCode() - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.ForHashCode
 
formatUnncessaryStubbingException(Class<?>, Collection<Invocation>) - Static method in class org.mockito.internal.exceptions.Reporter
 
ForReadObject() - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodAdvice.ForReadObject
 
ForwardsInvocations - Class in org.mockito.internal.stubbing.defaultanswers
Internal answer to forward invocations on a real instance.
ForwardsInvocations(Object) - Constructor for class org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations
 
ForWriteReplace() - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.ForWriteReplace
 
foundStubCalledWithDifferentArgs(Invocation, InvocationMatcher) - Method in interface org.mockito.internal.debugging.FindingsListener
 
foundStubCalledWithDifferentArgs(Invocation, InvocationMatcher) - Method in class org.mockito.internal.debugging.LoggingListener
 
foundUnstubbed(InvocationMatcher) - Method in interface org.mockito.internal.debugging.FindingsListener
 
foundUnstubbed(InvocationMatcher) - Method in class org.mockito.internal.debugging.LoggingListener
 
foundUnusedStub(Invocation) - Method in interface org.mockito.internal.debugging.FindingsListener
 
foundUnusedStub(Invocation) - Method in class org.mockito.internal.debugging.LoggingListener
 
framework() - Static method in class org.mockito.Mockito
For advanced users or framework integrators.
FriendlyReminderException - Exception in org.mockito.exceptions.misusing
 
FriendlyReminderException(String) - Constructor for exception org.mockito.exceptions.misusing.FriendlyReminderException
 
FromCallable(Callable<?>) - Constructor for class org.mockito.internal.invocation.RealMethod.FromCallable
 

G

GenericMaster - Class in org.mockito.internal.util.reflection
 
GenericMaster() - Constructor for class org.mockito.internal.util.reflection.GenericMaster
 
GenericMetadataSupport - Class in org.mockito.internal.util.reflection
This class can retrieve generic meta-data that the compiler stores on classes and accessible members.
GenericMetadataSupport() - Constructor for class org.mockito.internal.util.reflection.GenericMetadataSupport
 
GenericMetadataSupport.BoundedType - Interface in org.mockito.internal.util.reflection
Type representing bounds of a type
GenericMetadataSupport.TypeVarBoundedType - Class in org.mockito.internal.util.reflection
Type representing bounds of a type variable, allows to keep all bounds information.
GenericMetadataSupport.WildCardBoundedType - Class in org.mockito.internal.util.reflection
Type representing bounds of a wildcard, allows to keep all bounds information.
GenericTypeExtractor - Class in org.mockito.internal.util.reflection
Attempts to extract generic type of given target base class or target interface
GenericTypeExtractor() - Constructor for class org.mockito.internal.util.reflection.GenericTypeExtractor
 
genericTypeOf(Class<?>, Class<?>, Class<?>) - Static method in class org.mockito.internal.util.reflection.GenericTypeExtractor
Extract generic type of root class either from the target base class or from target base interface.
genericTypeOfMatcher(Class<?>) - Static method in class org.mockito.internal.hamcrest.MatcherGenericTypeExtractor
Gets the generic type of given matcher.
geq(T) - Static method in class org.mockito.AdditionalMatchers
argument greater than or equal the given value.
geq(byte) - Static method in class org.mockito.AdditionalMatchers
byte argument greater than or equal to the given value.
geq(double) - Static method in class org.mockito.AdditionalMatchers
double argument greater than or equal to the given value.
geq(float) - Static method in class org.mockito.AdditionalMatchers
float argument greater than or equal to the given value.
geq(int) - Static method in class org.mockito.AdditionalMatchers
int argument greater than or equal to the given value.
geq(long) - Static method in class org.mockito.AdditionalMatchers
long argument greater than or equal to the given value.
geq(short) - Static method in class org.mockito.AdditionalMatchers
short argument greater than or equal to the given value.
get() - Method in enum org.mockito.Answers
Deprecated.
as of 2.1.0 Use the enum-constant directly, instead of this getter. This method will be removed in a future release
E.g. instead of Answers.CALLS_REAL_METHODS.get() use Answers.CALLS_REAL_METHODS .
get(String, Object) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
get() - Method in interface org.mockito.internal.invocation.mockref.MockReference
 
get() - Method in class org.mockito.internal.invocation.mockref.MockStrongReference
 
get() - Method in class org.mockito.internal.invocation.mockref.MockWeakReference
 
get() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper
 
get() - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
get(Thread) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
get(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
get(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 
get() - Method in interface org.mockito.internal.util.Supplier
Provides an instance.
getActual() - Method in class org.mockito.internal.reporting.SmartPrinter
 
getActualCount() - Method in class org.mockito.internal.reporting.Discrepancy
 
getActualTypeArgumentFor(TypeVariable<?>) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
getAll() - Method in class org.mockito.internal.verification.DefaultRegisteredInvocations
 
getAll() - Method in interface org.mockito.internal.verification.RegisteredInvocations
 
getAll() - Method in class org.mockito.internal.verification.SingleRegisteredInvocation
 
getAllInvocations() - Method in interface org.mockito.internal.verification.api.VerificationData
All invocations recorded on the mock object that is being verified.
getAllInvocations() - Method in interface org.mockito.internal.verification.api.VerificationDataInOrder
 
getAllInvocations() - Method in class org.mockito.internal.verification.api.VerificationDataInOrderImpl
 
getAllInvocations() - Method in class org.mockito.internal.verification.VerificationDataImpl
 
getAllLocations(List<Invocation>) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
getAllStubbings() - Method in interface org.mockito.internal.listeners.StubbingLookupEvent
 
getAllValues() - Method in class org.mockito.ArgumentCaptor
Returns all captured values.
getAllValues() - Method in class org.mockito.internal.matchers.CapturingMatcher
 
getAnnotationEngine() - Method in class org.mockito.configuration.DefaultMockitoConfiguration
 
getAnnotationEngine() - Method in interface org.mockito.configuration.IMockitoConfiguration
Deprecated.
Please use the extension mechanism AnnotationEngine instead, this method will probably be removed in mockito 3.
getAnnotationEngine() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
getAnnotationEngine() - Static method in class org.mockito.internal.configuration.plugins.Plugins
Returns the annotation engine available for the current runtime.
getArgument(int) - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getArgument(int) - Method in interface org.mockito.invocation.InvocationOnMock
Returns casted argument at the given index.
getArgumentMatcherStorage() - Method in interface org.mockito.internal.progress.MockingProgress
 
getArgumentMatcherStorage() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
getArguments() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getArguments() - Method in interface org.mockito.invocation.InvocationOnMock
Returns arguments passed to the method.
getArgumentsBlock(List<ArgumentMatcher>, PrintSettings) - Method in class org.mockito.internal.matchers.text.MatchersPrinter
 
getArgumentsLine(List<ArgumentMatcher>, PrintSettings) - Method in class org.mockito.internal.matchers.text.MatchersPrinter
 
getBackingMap() - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
getCleanerThread() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
getCleanerThread() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
 
getConstructorArgs() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getConstructorArgs() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getConstructorArgs() - Method in interface org.mockito.mock.MockCreationSettings
Used when arguments should be passed to the mocked object's constructor, regardless of whether these arguments are supplied directly, or whether they include the outer instance.
getData() - Method in class org.mockito.internal.verification.VerificationEventImpl
 
getData() - Method in interface org.mockito.verification.VerificationEvent
 
getDefaultAnswer() - Method in class org.mockito.configuration.DefaultMockitoConfiguration
 
getDefaultAnswer() - Method in interface org.mockito.configuration.IMockitoConfiguration
Allows configuring the default answers of unstubbed invocations
getDefaultAnswer() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
getDefaultAnswer() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getDefaultAnswer() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getDefaultAnswer() - Method in interface org.mockito.mock.MockCreationSettings
the default answer for this mock, see MockSettings.defaultAnswer(org.mockito.stubbing.Answer).
getDefaultPlugin(Class<T>) - Method in interface org.mockito.plugins.MockitoPlugins
Returns the default plugin implementation used by Mockito.
getDefaultVerificationStrategy() - Static method in class org.mockito.internal.progress.MockingProgressImpl
 
getDelegate() - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
getDescription() - Method in class org.mockito.internal.runners.DefaultInternalRunner
 
getDescription() - Method in interface org.mockito.internal.runners.InternalRunner
 
getDescription() - Method in class org.mockito.internal.runners.StrictRunner
 
getDescription() - Method in class org.mockito.junit.MockitoJUnitRunner
 
getDescription() - Method in class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
Deprecated.
 
getDescription() - Method in class org.mockito.runners.MockitoJUnitRunner
Deprecated.
getDescription() - Method in class org.mockito.runners.VerboseMockitoJUnitRunner
Deprecated.
 
getExceptionTypes() - Method in class org.mockito.internal.creation.DelegatingMethod
 
getExceptionTypes() - Method in interface org.mockito.internal.invocation.MockitoMethod
 
getExceptionTypes() - Method in class org.mockito.internal.invocation.SerializableMethod
 
getExtraInterfaces() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getExtraInterfaces() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getExtraInterfaces() - Method in interface org.mockito.mock.MockCreationSettings
the extra interfaces the mock object should implement.
getFailure() - Method in class org.mockito.internal.junit.DefaultTestFinishedEvent
 
getFailure() - Method in interface org.mockito.internal.junit.TestFinishedEvent
 
getGenericType(Field) - Method in class org.mockito.internal.util.reflection.GenericMaster
Finds the generic type (parametrized type) of the field.
getHandler(Object) - Method in class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
 
getHandler(Object) - Method in class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
 
getHandler(Object) - Method in class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
getHandler(Object) - Method in interface org.mockito.plugins.MockMaker
Returns the handler for the mock.
getInlineMockMaker() - Method in interface org.mockito.plugins.MockitoPlugins
Returns inline mock maker, an optional mock maker that is bundled with Mockito distribution.
getInstantiator(MockCreationSettings<?>) - Method in class org.mockito.internal.creation.instance.DefaultInstantiatorProvider
 
getInstantiator(MockCreationSettings<?>) - Method in class org.mockito.internal.creation.instance.InstantiatorProvider2Adapter
 
getInstantiator(MockCreationSettings<?>) - Method in class org.mockito.internal.creation.instance.InstantiatorProviderAdapter
 
getInstantiator(MockCreationSettings<?>) - Method in interface org.mockito.plugins.InstantiatorProvider
Deprecated.
getInstantiator(MockCreationSettings<?>) - Method in interface org.mockito.plugins.InstantiatorProvider2
Returns an instantiator, used to create new class instances.
getInstantiatorProvider() - Static method in class org.mockito.internal.configuration.plugins.Plugins
Returns the instantiator provider available for the current runtime.
getInvocation() - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
getInvocation() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getInvocation() - Method in interface org.mockito.internal.listeners.StubbingLookupEvent
 
getInvocation() - Method in interface org.mockito.invocation.MatchableInvocation
The actual invocation Mockito will match against.
getInvocation() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getInvocation() - Method in interface org.mockito.stubbing.Stubbing
Returns the method invocation that is stubbed.
getInvocationContainer() - Method in class org.mockito.internal.handler.MockHandlerImpl
 
getInvocationContainer(Object) - Static method in class org.mockito.internal.util.MockUtil
 
getInvocationContainer() - Method in interface org.mockito.invocation.MockHandler
Returns the object that holds all invocations on the mock object, including stubbings with declared answers.
getInvocationFactory() - Method in class org.mockito.internal.framework.DefaultMockitoFramework
 
getInvocationFactory() - Method in interface org.mockito.MockitoFramework
Returns a factory that can create instances of Invocation.
getInvocationForStubbing() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
getInvocationListeners() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getInvocationListeners() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getInvocationListeners() - Method in interface org.mockito.mock.MockCreationSettings
getInvocations() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
getInvocations() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
getInvocations() - Method in interface org.mockito.MockingDetails
All method invocations on this mock.
getJavaMethod() - Method in class org.mockito.internal.creation.DelegatingMethod
 
getJavaMethod() - Method in interface org.mockito.internal.invocation.MockitoMethod
 
getJavaMethod() - Method in class org.mockito.internal.invocation.SerializableMethod
 
getLastInvocation() - Method in class org.mockito.internal.MockitoCore
For testing purposes only.
getLastLocation(List<Invocation>) - Static method in class org.mockito.internal.invocation.InvocationsFinder
 
getLastValue() - Method in class org.mockito.internal.matchers.CapturingMatcher
 
getLocation() - Method in class org.mockito.internal.debugging.Localized
 
getLocation() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getLocation() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getLocation() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
getLocation() - Method in interface org.mockito.invocation.DescribedInvocation
The place in the code where the invocation happened.
getLocation() - Method in interface org.mockito.invocation.Invocation
 
getLocationOfStubbing() - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
getLocationOfStubbing() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getMatcher() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
getMatcherApplicationStrategyFor(Invocation, List<ArgumentMatcher<?>>) - Static method in class org.mockito.internal.invocation.MatcherApplicationStrategy
Returns the MatcherApplicationStrategy that must be used to capture the arguments of the given invocation using the given matchers.
getMatchers() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getMatchers() - Method in interface org.mockito.invocation.MatchableInvocation
The argument matchers of this invocation.
getMessage() - Method in error org.mockito.exceptions.verification.junit.ArgumentsAreDifferent
 
getMethod() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getMethod() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getMethod() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
getMethod() - Method in interface org.mockito.invocation.InvocationOnMock
returns the method
getMethodName() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
getMock() - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
getMock() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getMock() - Method in class org.mockito.internal.stubbing.BaseStubbing
 
getMock() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
getMock() - Method in class org.mockito.internal.verification.MockAwareVerificationMode
 
getMock() - Method in class org.mockito.internal.verification.VerificationEventImpl
 
getMock() - Method in interface org.mockito.invocation.InvocationOnMock
returns the mock object
getMock() - Method in interface org.mockito.listeners.VerificationStartedEvent
The mock object that will be used during verification.
getMock() - Method in interface org.mockito.MockingDetails
Returns the mock object which is associated with this this instance of MockingDetails.
getMock() - Method in interface org.mockito.stubbing.OngoingStubbing
Returns the mock that was used for this stub.
getMock() - Method in interface org.mockito.verification.VerificationEvent
 
getMockCreationSettings() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
getMockCreationSettings() - Method in interface org.mockito.MockingDetails
Returns various mock settings provided when the mock was created, for example: mocked class, mock name (if any), any extra interfaces (if any), etc.
getMockHandler() - Method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor
 
getMockHandler() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
getMockHandler(T) - Static method in class org.mockito.internal.util.MockUtil
 
getMockHandler() - Method in interface org.mockito.MockingDetails
Returns the MockHandler associated with this mock object.
getMockitoInterceptor() - Method in interface org.mockito.internal.creation.bytebuddy.MockAccess
 
getMockMaker() - Static method in class org.mockito.internal.configuration.plugins.Plugins
Returns the implementation of the mock maker available for the current runtime.
getMockName() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getMockName() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getMockName(Object) - Static method in class org.mockito.internal.util.MockUtil
 
getMockName() - Method in interface org.mockito.mock.MockCreationSettings
the name of this mock, as printed on verification errors; see MockSettings.name(java.lang.String).
getMockSettings() - Method in class org.mockito.internal.handler.MockHandlerImpl
 
getMockSettings() - Method in interface org.mockito.internal.listeners.StubbingLookupEvent
 
getMockSettings(Object) - Static method in class org.mockito.internal.util.MockUtil
 
getMockSettings() - Method in interface org.mockito.invocation.MockHandler
Read-only settings the mock object was created with.
getMocksToBeVerifiedInOrder() - Method in class org.mockito.internal.InOrderImpl
 
getMode() - Method in class org.mockito.internal.verification.VerificationEventImpl
 
getMode() - Method in interface org.mockito.verification.VerificationEvent
 
getName() - Method in class org.mockito.internal.creation.DelegatingMethod
 
getName() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getName() - Method in interface org.mockito.internal.invocation.MockitoMethod
 
getName() - Method in class org.mockito.internal.invocation.SerializableMethod
 
getName() - Method in class org.mockito.internal.matchers.CompareEqual
 
getName() - Method in class org.mockito.internal.matchers.CompareTo
 
getName() - Method in class org.mockito.internal.matchers.GreaterOrEqual
 
getName() - Method in class org.mockito.internal.matchers.GreaterThan
 
getName() - Method in class org.mockito.internal.matchers.LessOrEqual
 
getName() - Method in class org.mockito.internal.matchers.LessThan
 
getObject() - Method in class org.mockito.internal.debugging.Localized
 
getOrderingContext() - Method in interface org.mockito.internal.verification.api.VerificationDataInOrder
 
getOrderingContext() - Method in class org.mockito.internal.verification.api.VerificationDataInOrderImpl
 
getOuterClassInstance() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getOuterClassInstance() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getOuterClassInstance() - Method in interface org.mockito.mock.MockCreationSettings
Used when mocking non-static inner classes in conjunction with MockCreationSettings.isUsingConstructor()
getParameterTypes() - Method in class org.mockito.internal.creation.DelegatingMethod
 
getParameterTypes() - Method in interface org.mockito.internal.invocation.MockitoMethod
 
getParameterTypes() - Method in class org.mockito.internal.invocation.SerializableMethod
 
getPlugins() - Static method in class org.mockito.internal.configuration.plugins.Plugins
 
getPlugins() - Method in class org.mockito.internal.framework.DefaultMockitoFramework
 
getPlugins() - Method in interface org.mockito.MockitoFramework
Returns an object that has access to Mockito plugins.
getPluralizedActualCount() - Method in class org.mockito.internal.reporting.Discrepancy
 
getPluralizedWantedCount() - Method in class org.mockito.internal.reporting.Discrepancy
 
getPluralizedWantedCount() - Method in class org.mockito.internal.verification.checkers.AtLeastDiscrepancy
 
getPollingPeriodMillis() - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
getRawArguments() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getRawArguments() - Method in interface org.mockito.invocation.Invocation
Returns unprocessed arguments whereas InvocationOnMock.getArguments() returns arguments already processed (e.g.
getRawReturnType() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getRawReturnType() - Method in interface org.mockito.invocation.Invocation
Returns unprocessed arguments whereas InvocationOnMock.getArguments() returns arguments already processed (e.g.
getRegisteredInvocations() - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
getReturnedValue() - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
getReturnedValue() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getReturnType() - Method in class org.mockito.internal.creation.DelegatingMethod
 
getReturnType() - Method in interface org.mockito.internal.invocation.MockitoMethod
 
getReturnType() - Method in class org.mockito.internal.invocation.SerializableMethod
 
getSequenceNumber() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
getSequenceNumber() - Method in interface org.mockito.invocation.Invocation
 
getSerializableMode() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getSerializableMode() - Method in interface org.mockito.mock.MockCreationSettings
 
getSerializationSupport() - Method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor
 
getSourceFile() - Method in class org.mockito.internal.debugging.LocationImpl
 
getSourceFile() - Method in interface org.mockito.invocation.Location
Source file of this location
getSpiedInstance() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getSpiedInstance() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getSpiedInstance() - Method in interface org.mockito.mock.MockCreationSettings
the spied instance - needed for spies.
getStackTraceCleaner(StackTraceCleaner) - Method in class org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleanerProvider
 
getStackTraceCleaner(StackTraceCleaner) - Method in interface org.mockito.plugins.StackTraceCleanerProvider
Allows configuring custom StackTraceCleaner.
getStackTraceCleanerProvider() - Static method in class org.mockito.internal.configuration.plugins.Plugins
The implementation of the stack trace cleaner
getStrictness() - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
getStrictness() - Method in interface org.mockito.stubbing.Stubbing
Informs about the Strictness level of this stubbing.
getStubbingFound() - Method in interface org.mockito.internal.listeners.StubbingLookupEvent
 
getStubbingInfo() - Method in class org.mockito.internal.debugging.LoggingListener
 
getStubbingLookupListeners() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getStubbings() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
getStubbings() - Method in interface org.mockito.MockingDetails
Returns stubbings declared on this mock object.
getStubbingsAscending() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
Stubbings in ascending order, most recent last
getStubbingsDescending() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
Stubbings in descending order, most recent first
getSuspiciouslyNotMatchingArgsIndexes(List<ArgumentMatcher>, Object[]) - Static method in class org.mockito.internal.verification.argumentmatching.ArgumentMatchingTool
Suspiciously not matching arguments are those that don't match, the toString() representation is the same but types are different.
getTarget() - Method in interface org.mockito.internal.verification.api.VerificationData
The target or wanted invocation.
getTarget() - Method in class org.mockito.internal.verification.VerificationDataImpl
 
getTestName() - Method in class org.mockito.internal.junit.DefaultTestFinishedEvent
 
getTestName() - Method in interface org.mockito.internal.junit.TestFinishedEvent
 
getThrowable() - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
getThrowable() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getTimer() - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
getTypeToMock() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getTypeToMock() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getTypeToMock() - Method in interface org.mockito.mock.MockCreationSettings
Mocked type.
getUnfilteredStackTrace() - Method in error org.mockito.exceptions.base.MockitoAssertionError
 
getUnfilteredStackTrace() - Method in exception org.mockito.exceptions.base.MockitoException
 
getUnfilteredStackTrace() - Method in exception org.mockito.exceptions.base.MockitoSerializationIssue
 
getUnfilteredStackTrace() - Method in error org.mockito.exceptions.verification.junit.ArgumentsAreDifferent
 
getUnusedStubbings(Iterable<Object>) - Method in class org.mockito.internal.junit.UnusedStubbingsFinder
Gets all unused stubbings for given set of mock objects, in order.
getUnusedStubbingsByLocation(Iterable<Object>) - Method in class org.mockito.internal.junit.UnusedStubbingsFinder
Gets unused stubbings per location.
getValue() - Method in class org.mockito.ArgumentCaptor
Returns the captured value of the argument.
getVerificationError() - Method in class org.mockito.internal.verification.VerificationEventImpl
 
getVerificationError() - Method in interface org.mockito.verification.VerificationEvent
A nullable Throwable if it is null, the verification succeeded, otherwise the throwable contains the cause of why the verification failed.
getVerificationStartedListeners() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
getVerificationStartedListeners() - Method in interface org.mockito.mock.MockCreationSettings
getWanted() - Method in class org.mockito.internal.matchers.Equals
 
getWanted() - Method in class org.mockito.internal.reporting.SmartPrinter
 
getWanted() - Method in interface org.mockito.internal.verification.api.VerificationData
Deprecated.
- This internal method leaks internal class InvocationMatcher. Please use VerificationData.getTarget() instead. Deprecated since 2.2.12
getWanted() - Method in interface org.mockito.internal.verification.api.VerificationDataInOrder
 
getWanted() - Method in class org.mockito.internal.verification.api.VerificationDataInOrderImpl
 
getWanted() - Method in class org.mockito.internal.verification.VerificationDataImpl
 
getWantedCount() - Method in class org.mockito.internal.reporting.Discrepancy
 
getWarnings() - Method in class org.mockito.internal.debugging.WarningsCollector
Deprecated.
 
given(T) - Method in interface org.mockito.BDDMockito.BDDStubber
given(T) - Static method in class org.mockito.BDDMockito
GlobalConfiguration - Class in org.mockito.internal.configuration
Thread-safe wrapper on user-defined org.mockito.configuration.MockitoConfiguration implementation
GlobalConfiguration() - Constructor for class org.mockito.internal.configuration.GlobalConfiguration
 
GloballyConfiguredAnswer - Class in org.mockito.internal.stubbing.defaultanswers
Globally configured Answer.
GloballyConfiguredAnswer() - Constructor for class org.mockito.internal.stubbing.defaultanswers.GloballyConfiguredAnswer
 
GreaterOrEqual<T extends Comparable<T>> - Class in org.mockito.internal.matchers
 
GreaterOrEqual(T) - Constructor for class org.mockito.internal.matchers.GreaterOrEqual
 
GreaterThan<T extends Comparable<T>> - Class in org.mockito.internal.matchers
 
GreaterThan(T) - Constructor for class org.mockito.internal.matchers.GreaterThan
 
gt(T) - Static method in class org.mockito.AdditionalMatchers
comparable argument greater than the given value.
gt(byte) - Static method in class org.mockito.AdditionalMatchers
byte argument greater than the given value.
gt(double) - Static method in class org.mockito.AdditionalMatchers
double argument greater than the given value.
gt(float) - Static method in class org.mockito.AdditionalMatchers
float argument greater than the given value.
gt(int) - Static method in class org.mockito.AdditionalMatchers
int argument greater than the given value.
gt(long) - Static method in class org.mockito.AdditionalMatchers
long argument greater than the given value.
gt(short) - Static method in class org.mockito.AdditionalMatchers
short argument greater than the given value.

H

HamcrestArgumentMatcher<T> - Class in org.mockito.internal.hamcrest
 
HamcrestArgumentMatcher(Matcher<T>) - Constructor for class org.mockito.internal.hamcrest.HamcrestArgumentMatcher
 
handle(Object, Method, Object[]) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodAdvice
 
handle(Object, Method, Object[]) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
handle(Invocation) - Method in class org.mockito.internal.handler.MockHandlerImpl
 
handle(Invocation) - Method in interface org.mockito.invocation.MockHandler
Takes an invocation object and handles it.
handleSpyAnnotation() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
hasAnswersForStubbing() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
hashCode() - Method in class org.mockito.internal.creation.DelegatingMethod
 
hashCode() - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
hashCode() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
hashCode() - Method in class org.mockito.internal.invocation.SerializableMethod
 
hashCode() - Method in class org.mockito.internal.matchers.Equals
 
hashCode() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper
 
hashCode() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
hashCode() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
 
hashCode() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
hashCode() - Method in class org.mockito.internal.util.reflection.InstanceField
 
HashCodeAndEqualsMockWrapper - Class in org.mockito.internal.util.collections
hashCode and equals safe mock wrapper.
HashCodeAndEqualsMockWrapper(Object) - Constructor for class org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper
 
HashCodeAndEqualsSafeSet - Class in org.mockito.internal.util.collections
hashCode and equals safe hash based set.
HashCodeAndEqualsSafeSet() - Constructor for class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
hasInvocationForPotentialStubbing() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
hasInvocationListeners() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
hasRawExtraInterfaces() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
hasSameMethod(Invocation) - Method in class org.mockito.internal.invocation.InvocationMatcher
 
hasSameMethod(Invocation) - Method in interface org.mockito.invocation.MatchableInvocation
Returns true if the candidate invocation has the same method (method name and parameter types)
hasSimilarMethod(Invocation) - Method in class org.mockito.internal.invocation.InvocationMatcher
similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloaded
hasSimilarMethod(Invocation) - Method in interface org.mockito.invocation.MatchableInvocation
Candidate invocation has the similar method.
hasTestMethods(Class<?>) - Static method in class org.mockito.internal.runners.util.TestMethodsFinder
 

I

IdentitySet - Class in org.mockito.internal.util.collections
 
IdentitySet() - Constructor for class org.mockito.internal.util.collections.IdentitySet
 
ignoreForVerification() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
ignoreForVerification() - Method in interface org.mockito.invocation.Invocation
Configures this invocation to be ignored for verify-no-more-invocations or verification in order.
ignoreStubs(Object...) - Method in class org.mockito.internal.MockitoCore
 
ignoreStubs(Object...) - Static method in class org.mockito.Mockito
Ignores stubbed methods of given mocks for the sake of verification.
IMockitoConfiguration - Interface in org.mockito.configuration
Use it to configure Mockito.
incorrectUseOfAdditionalMatchers(String, int, Collection<LocalizedMatcher>) - Static method in class org.mockito.internal.exceptions.Reporter
 
incorrectUseOfApi() - Static method in class org.mockito.internal.exceptions.Reporter
 
Incubating - Annotation Type in org.mockito
The annotation conveys following information: The API is fairly new and we would appreciate your feedback.
IndependentAnnotationEngine - Class in org.mockito.internal.configuration
Initializes fields annotated with @Mock or @Captor.
IndependentAnnotationEngine() - Constructor for class org.mockito.internal.configuration.IndependentAnnotationEngine
 
inferFrom(Type) - Static method in class org.mockito.internal.util.reflection.GenericMetadataSupport
Create an new instance of GenericMetadataSupport inferred from a Type.
inheritValue(T) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
initialize() - Method in class org.mockito.internal.util.reflection.FieldInitializer
Initialize field if not initialized and return the actual instance.
initialValue(Thread) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
initMocks(Object) - Method in class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
initMocks(Object...) - Method in class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
initMocks(Object) - Static method in class org.mockito.MockitoAnnotations
Initializes objects annotated with Mockito annotations for given testClass: @Mock, @Spy, @Captor, @InjectMocks
initMocks(Object) - Method in interface org.mockito.session.MockitoSessionBuilder
Adds the test class instance for initialization of fields annotated with Mockito annotations like Mock.
initMocks(Object...) - Method in interface org.mockito.session.MockitoSessionBuilder
Adds the test class instances for initialization of fields annotated with Mockito annotations like Mock.
InjectingAnnotationEngine - Class in org.mockito.internal.configuration
InjectingAnnotationEngine() - Constructor for class org.mockito.internal.configuration.InjectingAnnotationEngine
 
InjectionBase - Class in org.mockito.codegen
This class is required to resolve a method handle lookup for the org.mockito.codegen package what requires a preexisting class for the package.
InjectMocks - Annotation Type in org.mockito
Mark a field on which injection should be performed.
injectMocks(Object) - Method in class org.mockito.internal.configuration.InjectingAnnotationEngine
Initializes mock/spies dependencies for objects annotated with @InjectMocks for given testClassInstance.
InjectMocksException - Exception in org.mockito.exceptions.misusing
Thrown when creation of test subject annotated with InjectMocks fails.
InjectMocksException(String, Throwable) - Constructor for exception org.mockito.exceptions.misusing.InjectMocksException
 
injectMocksOnFields(Set<Field>, Set<Object>, Object) - Method in class org.mockito.internal.configuration.DefaultInjectionEngine
 
InjectMocksScanner - Class in org.mockito.internal.configuration.injection.scanner
Scan field for injection.
InjectMocksScanner(Class<?>) - Constructor for class org.mockito.internal.configuration.injection.scanner.InjectMocksScanner
Create a new InjectMocksScanner for the given clazz on the given instance
InlineByteBuddyMockMaker - Class in org.mockito.internal.creation.bytebuddy
Agent and subclass based mock maker.
InlineByteBuddyMockMaker() - Constructor for class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
 
InlineBytecodeGenerator - Class in org.mockito.internal.creation.bytebuddy
 
InlineBytecodeGenerator(Instrumentation, WeakConcurrentMap<Object, MockMethodInterceptor>) - Constructor for class org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator
 
InOrder - Interface in org.mockito
Allows verification in order.
inOrder(Object...) - Method in class org.mockito.internal.MockitoCore
 
inOrder(Object...) - Static method in class org.mockito.Mockito
Creates InOrder object that allows verifying mocks in order.
InOrderContext - Interface in org.mockito.internal.verification.api
 
InOrderContextImpl - Class in org.mockito.internal.verification
 
InOrderContextImpl() - Constructor for class org.mockito.internal.verification.InOrderContextImpl
 
InOrderImpl - Class in org.mockito.internal
Allows verifying in order.
InOrderImpl(List<?>) - Constructor for class org.mockito.internal.InOrderImpl
 
inOrderRequiresFamiliarMock() - Static method in class org.mockito.internal.exceptions.Reporter
 
InOrderWrapper - Class in org.mockito.internal.verification
 
InOrderWrapper(VerificationInOrderMode, InOrderImpl) - Constructor for class org.mockito.internal.verification.InOrderWrapper
 
InstanceField - Class in org.mockito.internal.util.reflection
Represents an accessible instance field.
InstanceField(Field, Object) - Constructor for class org.mockito.internal.util.reflection.InstanceField
Create a new InstanceField.
InstanceFields(Object, List<InstanceField>) - Constructor for class org.mockito.internal.util.reflection.Fields.InstanceFields
 
instanceFields() - Method in class org.mockito.internal.util.reflection.Fields.InstanceFields
 
InstanceOf - Class in org.mockito.internal.matchers
 
InstanceOf(Class<?>) - Constructor for class org.mockito.internal.matchers.InstanceOf
 
InstanceOf(Class<?>, String) - Constructor for class org.mockito.internal.matchers.InstanceOf
 
InstanceOf.VarArgAware - Class in org.mockito.internal.matchers
 
InstantiationException - Exception in org.mockito.creation.instance
Exception generated when Instantiator.newInstance(Class) failed.
InstantiationException(String, Throwable) - Constructor for exception org.mockito.creation.instance.InstantiationException
 
InstantiationException - Exception in org.mockito.internal.creation.instance
Deprecated.
since 2.15.4 because this internal class was leaking from the public API. For information why deprecated, see InstantiatorProvider2. Use Instantiator and InstantiationException types instead.

Exception generated when Instantiator.newInstance(Class) failed.

InstantiationException(String, Throwable) - Constructor for exception org.mockito.internal.creation.instance.InstantiationException
Deprecated.
 
Instantiator - Interface in org.mockito.creation.instance
Provides instances of classes.
Instantiator - Interface in org.mockito.internal.creation.instance
Deprecated.
since 2.15.4 because this internal class was leaking from the public API. For more information why deprecated, see InstantiatorProvider2. Use Instantiator instead.

Provides instances of classes.

InstantiatorProvider - Interface in org.mockito.plugins
Deprecated.
since 2.15.4 because this internal class was leaking from the public API. For more information why deprecated, see InstantiatorProvider2 and Issue 1303

Mockito will invoke this interface in order to fetch an instance instantiator provider.

By default, an internal byte-buddy/asm/objenesis based implementation is used.

Using the extension point

The plugin mechanism of mockito works in a similar way as the ServiceLoader, however instead of looking in the META-INF directory, Mockito will look in mockito-extensions directory. The reason for that is that Android SDK strips jar from the META-INF directory when creating an APK.

  1. The implementation itself, for example org.awesome.mockito.AwesomeInstantiatorProvider that implements the InstantiatorProvider.
  2. A file "mockito-extensions/org.mockito.plugins.InstantiatorProvider". The content of this file is exactly a one line with the qualified name: org.awesome.mockito.AwesomeInstantiatorProvider.

Note that if several mockito-extensions/org.mockito.plugins.InstantiatorProvider files exists in the classpath, Mockito will only use the first returned by the standard ClassLoader.getResource(java.lang.String) mechanism.

So just create a custom implementation of InstantiatorProvider and place the qualified name in the following file mockito-extensions/org.mockito.plugins.InstantiatorProvider.

This class is deprecated and was replaced by InstantiatorProvider2. Hence if there is both a mockito-extensions/org.mockito.plugins.InstantiatorProvider and mockito-extensions/org.mockito.plugins.InstantiatorProvider2 the second one takes preference.

InstantiatorProvider2 - Interface in org.mockito.plugins
Mockito will invoke this interface in order to fetch an instance instantiator provider.
InstantiatorProvider2Adapter - Class in org.mockito.internal.creation.instance
Adapts new public API InstantiatorProvider2 onto old, deprecated API InstantiatorProvider
InstantiatorProvider2Adapter(InstantiatorProvider2) - Constructor for class org.mockito.internal.creation.instance.InstantiatorProvider2Adapter
 
InstantiatorProviderAdapter - Class in org.mockito.internal.creation.instance
Adapts old, deprecated InstantiatorProvider onto a new public InstantiatorProvider2 API.
InstantiatorProviderAdapter(InstantiatorProvider) - Constructor for class org.mockito.internal.creation.instance.InstantiatorProviderAdapter
 
interceptAbstract(Object, MockMethodInterceptor, Object, Method, Object[]) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.DispatcherDefaultingToRealMethod
 
InterceptedInvocation - Class in org.mockito.internal.invocation
 
InterceptedInvocation(MockReference<Object>, MockitoMethod, Object[], RealMethod, Location, int) - Constructor for class org.mockito.internal.invocation.InterceptedInvocation
 
interceptSuperCallable(Object, MockMethodInterceptor, Method, Object[], Callable<?>) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.DispatcherDefaultingToRealMethod
 
interfaceBounds() - Method in interface org.mockito.internal.util.reflection.GenericMetadataSupport.BoundedType
 
interfaceBounds() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
On a Type Variable (typeVar extends C_0 & I_1 & I_2 & etc), will return an array containing I_1 and I_2.
interfaceBounds() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
InternalMockHandler<T> - Interface in org.mockito.internal
Deprecated.
InternalRunner - Interface in org.mockito.internal.runners
I'm using this surrogate interface to hide internal Runner implementations.
intThat(ArgumentMatcher<Integer>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom int argument matchers.
intThat(Matcher<Integer>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive int arguments.
invalidArgumentPositionRangeAtInvocationTime(InvocationOnMock, boolean, int) - Static method in class org.mockito.internal.exceptions.Reporter
 
invalidArgumentRangeAtIdentityAnswerCreationTime() - Static method in class org.mockito.internal.exceptions.Reporter
 
invalidUseOfMatchers(int, List<LocalizedMatcher>) - Static method in class org.mockito.internal.exceptions.Reporter
 
InvalidUseOfMatchersException - Exception in org.mockito.exceptions.misusing
 
InvalidUseOfMatchersException(String) - Constructor for exception org.mockito.exceptions.misusing.InvalidUseOfMatchersException
 
InvalidUseOfMatchersException() - Constructor for exception org.mockito.exceptions.misusing.InvalidUseOfMatchersException
 
Invocation - Interface in org.mockito.invocation
A method call on a mock object.
InvocationComparator - Class in org.mockito.internal.invocation
Compares invocations based on the sequence number
InvocationComparator() - Constructor for class org.mockito.internal.invocation.InvocationComparator
 
InvocationContainer - Interface in org.mockito.invocation
Although this class is a part of public API, please don't provide your own implementations.
InvocationContainerImpl - Class in org.mockito.internal.stubbing
 
InvocationContainerImpl(MockCreationSettings) - Constructor for class org.mockito.internal.stubbing.InvocationContainerImpl
 
InvocationFactory - Interface in org.mockito.invocation
InvocationFactory.RealMethodBehavior<R> - Interface in org.mockito.invocation
Behavior of the real method.
InvocationInfo - Class in org.mockito.internal.stubbing.answers
 
InvocationInfo(InvocationOnMock) - Constructor for class org.mockito.internal.stubbing.answers.InvocationInfo
 
InvocationListener - Interface in org.mockito.listeners
This listener can be notified of method invocations on a mock.
invocationListeners(InvocationListener...) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
invocationListeners - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
invocationListeners(InvocationListener...) - Method in interface org.mockito.MockSettings
Registers a listener for method invocations on this mock.
invocationListenersRequiresAtLeastOneListener() - Static method in class org.mockito.internal.exceptions.Reporter
 
invocationListenerThrewException(InvocationListener, Throwable) - Static method in class org.mockito.internal.exceptions.Reporter
 
InvocationMarker - Class in org.mockito.internal.invocation
 
InvocationMatcher - Class in org.mockito.internal.invocation
In addition to all content of the invocation, the invocation matcher contains the argument matchers.
InvocationMatcher(Invocation, List<ArgumentMatcher>) - Constructor for class org.mockito.internal.invocation.InvocationMatcher
 
InvocationMatcher(Invocation) - Constructor for class org.mockito.internal.invocation.InvocationMatcher
 
InvocationOnMock - Interface in org.mockito.invocation
An invocation on a mock.
InvocationsFinder - Class in org.mockito.internal.invocation
 
InvocationsPrinter - Class in org.mockito.internal.debugging
Prints invocations in human-readable, printable way
InvocationsPrinter() - Constructor for class org.mockito.internal.debugging.InvocationsPrinter
 
invoke() - Method in class org.mockito.internal.invocation.RealMethod.FromBehavior
 
invoke() - Method in interface org.mockito.internal.invocation.RealMethod
 
invoke() - Method in enum org.mockito.internal.invocation.RealMethod.IsIllegal
 
invokedMock() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
invokeSuper(Object, Object[]) - Method in interface org.mockito.internal.creation.util.MockitoMethodProxy
 
IOUtil - Class in org.mockito.internal.util.io
IO utils.
IOUtil() - Constructor for class org.mockito.internal.util.io.IOUtil
 
isA(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Object argument that implements the given class.
isAbstract() - Method in class org.mockito.internal.creation.DelegatingMethod
 
isAbstract() - Method in interface org.mockito.internal.invocation.AbstractAwareMethod
 
isAbstract() - Method in class org.mockito.internal.invocation.SerializableMethod
 
isAbstract() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
isAndroid() - Static method in class org.mockito.internal.util.Platform
 
isAndroidMockMakerRequired() - Static method in class org.mockito.internal.util.Platform
 
isAnnotatedBy(Class<? extends Annotation>) - Method in class org.mockito.internal.util.reflection.InstanceField
Check if the field is annotated by the given annotation.
isAssignableFromWrapper(Class<?>, Class<?>) - Static method in class org.mockito.internal.util.Primitives
 
isCompareToMethod(Method) - Static method in class org.mockito.internal.util.ObjectMethodsGuru
 
isCounting() - Method in class org.mockito.internal.util.Timer
Informs whether the timer is still counting down.
isDeclaredOnInterface() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
isDefault() - Method in class org.mockito.internal.util.MockNameImpl
 
isDefault() - Method in interface org.mockito.mock.MockName
default name means generated by Mockito.
isEmpty() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
isEmpty() - Method in class org.mockito.internal.verification.DefaultRegisteredInvocations
 
isEmpty() - Method in interface org.mockito.internal.verification.RegisteredInvocations
 
isEmpty() - Method in class org.mockito.internal.verification.SingleRegisteredInvocation
 
isEnabled(String) - Method in interface org.mockito.plugins.PluginSwitch
Mockito invokes this method for every plugin found in the classpath (except from the PluginSwitch implementation itself).
isIgnoredForVerification() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
isIgnoredForVerification() - Method in interface org.mockito.invocation.Invocation
Informs if the invocation participates in verify-no-more-invocations or verification in order.
isIn(StackTraceElement) - Method in interface org.mockito.exceptions.stacktrace.StackTraceCleaner
Decides if element is included.
isIn(StackTraceElement) - Method in class org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner
 
isInvokable() - Method in class org.mockito.internal.invocation.RealMethod.FromBehavior
 
isInvokable() - Method in enum org.mockito.internal.invocation.RealMethod.IsIllegal
 
isInvokable() - Method in interface org.mockito.internal.invocation.RealMethod
 
isJava8BelowUpdate45() - Static method in class org.mockito.internal.util.Platform
 
isLenient() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
isLenient() - Method in interface org.mockito.mock.MockCreationSettings
Informs if the mock was created with "lenient" strictness, e.g.
isListenerDirty() - Method in class org.mockito.internal.junit.UniversalTestListener
isListenerDirty() - Method in interface org.mockito.internal.listeners.AutoCleanableListener
Indicates that the listener is dirty and should be removed from the subscribers
isMock(Object) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodAdvice
 
isMock(Object) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
isMock() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
isMock(Object) - Static method in class org.mockito.internal.util.MockUtil
 
isMock() - Method in interface org.mockito.MockingDetails
Informs if the object is a mock.
isMocked(Object) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodAdvice
 
isMocked(Object) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
isMultiline() - Method in class org.mockito.internal.reporting.PrintSettings
 
isNotNull() - Static method in class org.mockito.ArgumentMatchers
Not null argument.
isNotNull(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
isNull() - Static method in class org.mockito.ArgumentMatchers
null argument.
isNull(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
isNull() - Method in class org.mockito.internal.util.reflection.FieldReader
 
isNull() - Method in class org.mockito.internal.util.reflection.InstanceField
Check that the field is not null.
isOut(T) - Method in interface org.mockito.internal.util.collections.ListUtil.Filter
 
isOverridden(Object, Method) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodAdvice
 
isOverridden(Object, Method) - Method in class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
isPrimitiveOrWrapper(Class<?>) - Static method in class org.mockito.internal.util.Primitives
Indicates if the given class is primitive type or a primitive wrapper.
isReturnOnSuccess() - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
 
isSerializable() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
isSerializable() - Method in interface org.mockito.mock.MockCreationSettings
if the mock is serializable, see MockSettings.serializable().
isSpy() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
isSpy(Object) - Static method in class org.mockito.internal.util.MockUtil
 
isSpy() - Method in interface org.mockito.MockingDetails
Informs if the object is a spy.
isStripAnnotations() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
isStripAnnotations() - Method in interface org.mockito.mock.MockCreationSettings
Whether the mock should not make a best effort to preserve annotations.
isStubOnly() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
isStubOnly() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
isStubOnly() - Method in interface org.mockito.mock.MockCreationSettings
Whether the mock is only for stubbing, i.e.
isSuccessful() - Method in class org.mockito.internal.runners.util.FailureDetector
 
isSynthetic() - Method in class org.mockito.internal.util.reflection.InstanceField
Check if the field is synthetic.
isToStringMethod(Method) - Static method in class org.mockito.internal.util.ObjectMethodsGuru
 
isTypeMockable(Class<?>) - Method in class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
 
isTypeMockable(Class<?>) - Method in class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
 
isTypeMockable(Class<?>) - Method in class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
isTypeMockable(Class<?>) - Method in class org.mockito.internal.MockitoCore
 
isTypeMockable(Class<?>) - Method in interface org.mockito.plugins.MockMaker
Indicates if the given type can be mocked by this mockmaker.
isUsingConstructor() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
isUsingConstructor() - Method in class org.mockito.internal.creation.settings.CreationSettings
 
isUsingConstructor() - Method in interface org.mockito.mock.MockCreationSettings
Informs whether the mock instance should be created via constructor
isValidException(Throwable) - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
isValidReturnType(Class<?>) - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
isVarargMatcher() - Method in class org.mockito.internal.hamcrest.HamcrestArgumentMatcher
 
isVarArgs() - Method in class org.mockito.internal.creation.DelegatingMethod
 
isVarArgs() - Method in interface org.mockito.internal.invocation.MockitoMethod
 
isVarArgs() - Method in class org.mockito.internal.invocation.SerializableMethod
 
isVerified() - Method in interface org.mockito.internal.exceptions.VerificationAwareInvocation
 
isVerified(Invocation) - Method in class org.mockito.internal.InOrderImpl
 
isVerified() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
isVerified(Invocation) - Method in interface org.mockito.internal.verification.api.InOrderContext
 
isVerified(Invocation) - Method in class org.mockito.internal.verification.InOrderContextImpl
 
isVerified() - Method in interface org.mockito.invocation.Invocation
 
isVoid() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
Returns true is the return type is Void or represents the pseudo-type to the keyword void.
Iterables - Class in org.mockito.internal.util.collections
Utilities for Iterables
Iterables() - Constructor for class org.mockito.internal.util.collections.Iterables
 
iterator() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
iterator() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
iterator() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 
iterator() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
 

J

JAVA_VERSION - Static variable in class org.mockito.internal.util.Platform
 
JavaEightUtil - Class in org.mockito.internal.util
Helper class to work with features that were introduced in Java versions after 1.5.
jdkField() - Method in class org.mockito.internal.util.reflection.InstanceField
Returns the JDK Field instance.
join(Object...) - Static method in class org.mockito.internal.util.StringUtil
Joins Strings with line break character.
join(String, Collection<?>) - Static method in class org.mockito.internal.util.StringUtil
Joins Strings with EOL character
join(String, String, Collection<?>) - Static method in class org.mockito.internal.util.StringUtil
Joins Strings with EOL character
JUnitFailureHacker - Class in org.mockito.internal.junit.util
Deprecated.
JUnitFailureHacker() - Constructor for class org.mockito.internal.junit.util.JUnitFailureHacker
Deprecated.
 
JUnitRule - Class in org.mockito.internal.junit
Internal implementation.
JUnitRule(MockitoLogger, Strictness) - Constructor for class org.mockito.internal.junit.JUnitRule
 
JVM_INFO - Static variable in class org.mockito.internal.util.Platform
 
JVM_NAME - Static variable in class org.mockito.internal.util.Platform
 
JVM_VENDOR - Static variable in class org.mockito.internal.util.Platform
 
JVM_VENDOR_VERSION - Static variable in class org.mockito.internal.util.Platform
 
JVM_VERSION - Static variable in class org.mockito.internal.util.Platform
 

L

LAST_ARGUMENT - Static variable in class org.mockito.internal.stubbing.answers.ReturnsArgumentAt
 
lenient() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
lenient - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
lenient() - Method in class org.mockito.internal.MockitoCore
 
lenient() - Static method in class org.mockito.Mockito
Lenient stubs bypass "strict stubbing" validation (see Strictness.STRICT_STUBS).
lenient() - Method in interface org.mockito.MockSettings
Lenient mocks bypass "strict stubbing" validation (see Strictness.STRICT_STUBS).
LenientCopyTool - Class in org.mockito.internal.util.reflection
 
LenientCopyTool() - Constructor for class org.mockito.internal.util.reflection.LenientCopyTool
 
LenientStubber - Interface in org.mockito.stubbing
Used for declaring optional stubbings with Mockito.lenient()
leq(T) - Static method in class org.mockito.AdditionalMatchers
comparable argument less than or equal the given value details.
leq(byte) - Static method in class org.mockito.AdditionalMatchers
byte argument less than or equal to the given value.
leq(double) - Static method in class org.mockito.AdditionalMatchers
double argument less than or equal to the given value.
leq(float) - Static method in class org.mockito.AdditionalMatchers
float argument less than or equal to the given value.
leq(int) - Static method in class org.mockito.AdditionalMatchers
int argument less than or equal to the given value.
leq(long) - Static method in class org.mockito.AdditionalMatchers
long argument less than or equal to the given value.
leq(short) - Static method in class org.mockito.AdditionalMatchers
short argument less than or equal to the given value.
LessOrEqual<T extends Comparable<T>> - Class in org.mockito.internal.matchers
 
LessOrEqual(T) - Constructor for class org.mockito.internal.matchers.LessOrEqual
 
LessThan<T extends Comparable<T>> - Class in org.mockito.internal.matchers
 
LessThan(T) - Constructor for class org.mockito.internal.matchers.LessThan
 
ListUtil - Class in org.mockito.internal.util.collections
Basic list/collection operators.
ListUtil() - Constructor for class org.mockito.internal.util.collections.ListUtil
 
ListUtil.Converter<From,To> - Interface in org.mockito.internal.util.collections
 
ListUtil.Filter<T> - Interface in org.mockito.internal.util.collections
 
loadConfiguration() - Method in class org.mockito.internal.configuration.ClassPathLoader
 
Localized<T> - Class in org.mockito.internal.debugging
 
Localized(T) - Constructor for class org.mockito.internal.debugging.Localized
 
LocalizedMatcher - Class in org.mockito.internal.matchers
 
LocalizedMatcher(ArgumentMatcher<?>) - Constructor for class org.mockito.internal.matchers.LocalizedMatcher
 
Location - Interface in org.mockito.invocation
Describes the location of something in the source code.
LocationImpl - Class in org.mockito.internal.debugging
 
LocationImpl() - Constructor for class org.mockito.internal.debugging.LocationImpl
 
LocationImpl(StackTraceFilter) - Constructor for class org.mockito.internal.debugging.LocationImpl
 
LocationImpl(Throwable) - Constructor for class org.mockito.internal.debugging.LocationImpl
 
log(String) - Method in class org.mockito.internal.session.MockitoSessionLoggerAdapter
 
log(Object) - Method in class org.mockito.internal.util.ConsoleMockitoLogger
 
log(Object) - Method in interface org.mockito.internal.util.MockitoLogger
 
log(String) - Method in interface org.mockito.session.MockitoSessionLogger
Logs the hint.
logger(MockitoSessionLogger) - Method in class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
logger(MockitoSessionLogger) - Method in interface org.mockito.session.MockitoSessionBuilder
Configures logger used by MockitoSession for emitting warnings when finishing the session.
LoggingListener - Class in org.mockito.internal.debugging
 
LoggingListener(boolean) - Constructor for class org.mockito.internal.debugging.LoggingListener
 
longThat(ArgumentMatcher<Long>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom long argument matchers.
longThat(Matcher<Long>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive long arguments.
lt(T) - Static method in class org.mockito.AdditionalMatchers
comparable argument less than the given value.
lt(byte) - Static method in class org.mockito.AdditionalMatchers
byte argument less than the given value.
lt(double) - Static method in class org.mockito.AdditionalMatchers
double argument less than the given value.
lt(float) - Static method in class org.mockito.AdditionalMatchers
float argument less than the given value.
lt(int) - Static method in class org.mockito.AdditionalMatchers
int argument less than the given value.
lt(long) - Static method in class org.mockito.AdditionalMatchers
long argument less than the given value.
lt(short) - Static method in class org.mockito.AdditionalMatchers
short argument less than the given value.

M

markStubbed(StubInfo) - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
markStubbed(StubInfo) - Method in interface org.mockito.invocation.Invocation
Marks this invocation as stubbed.
markStubUsed(DescribedInvocation) - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
markVerified(Invocation) - Method in class org.mockito.internal.InOrderImpl
 
markVerified() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
markVerified(List<Invocation>, MatchableInvocation) - Static method in class org.mockito.internal.invocation.InvocationMarker
 
markVerified(Invocation, MatchableInvocation) - Static method in class org.mockito.internal.invocation.InvocationMarker
 
markVerified(Invocation) - Method in interface org.mockito.internal.verification.api.InOrderContext
 
markVerified(Invocation) - Method in class org.mockito.internal.verification.InOrderContextImpl
 
markVerified() - Method in interface org.mockito.invocation.Invocation
Marks this invocation as verified so that it will not cause verification error at Mockito.verifyNoMoreInteractions(Object...)
markVerifiedInOrder(List<Invocation>, MatchableInvocation, InOrderContext) - Static method in class org.mockito.internal.invocation.InvocationMarker
 
MatchableInvocation - Interface in org.mockito.invocation
MatchableInvocation wraps Invocation instance and holds argument matchers associated with that invocation.
MatcherApplicationStrategy - Class in org.mockito.internal.invocation
 
MatcherGenericTypeExtractor - Class in org.mockito.internal.hamcrest
Extracts generic type of matcher
MatcherGenericTypeExtractor() - Constructor for class org.mockito.internal.hamcrest.MatcherGenericTypeExtractor
 
Matchers - Class in org.mockito
Deprecated.
Use ArgumentMatchers. This class is now deprecated in order to avoid a name clash with Hamcrest org.hamcrest.Matchers class. This class will likely be removed in version 3.0.
Matchers() - Constructor for class org.mockito.Matchers
Deprecated.
 
MatchersBinder - Class in org.mockito.internal.invocation
 
MatchersBinder() - Constructor for class org.mockito.internal.invocation.MatchersBinder
 
MatchersPrinter - Class in org.mockito.internal.matchers.text
 
MatchersPrinter() - Constructor for class org.mockito.internal.matchers.text.MatchersPrinter
 
matches(T) - Method in interface org.mockito.ArgumentMatcher
Informs if this matcher accepts the given argument.
matches(String) - Static method in class org.mockito.ArgumentMatchers
String argument that matches the given regular expression.
matches(Pattern) - Static method in class org.mockito.ArgumentMatchers
Pattern argument that matches the given regular expression.
matches(Object) - Method in class org.mockito.internal.hamcrest.HamcrestArgumentMatcher
 
matches(Invocation) - Method in class org.mockito.internal.invocation.InvocationMatcher
 
matches(Object) - Method in class org.mockito.internal.matchers.And
 
matches(Object) - Method in class org.mockito.internal.matchers.Any
 
matches(Object) - Method in class org.mockito.internal.matchers.apachecommons.ReflectionEquals
 
matches(Object) - Method in class org.mockito.internal.matchers.ArrayEquals
 
matches(Object) - Method in class org.mockito.internal.matchers.CapturingMatcher
 
matches(T) - Method in class org.mockito.internal.matchers.CompareTo
 
matches(String) - Method in class org.mockito.internal.matchers.Contains
 
matches(String) - Method in class org.mockito.internal.matchers.EndsWith
 
matches(Object) - Method in class org.mockito.internal.matchers.Equals
 
matches(Number) - Method in class org.mockito.internal.matchers.EqualsWithDelta
 
matches(String) - Method in class org.mockito.internal.matchers.Find
 
matches(Object) - Method in class org.mockito.internal.matchers.InstanceOf
 
Matches - Class in org.mockito.internal.matchers
 
Matches(String) - Constructor for class org.mockito.internal.matchers.Matches
 
Matches(Pattern) - Constructor for class org.mockito.internal.matchers.Matches
 
matches(Object) - Method in class org.mockito.internal.matchers.Matches
 
matches(Object) - Method in class org.mockito.internal.matchers.Not
 
matches(Object) - Method in class org.mockito.internal.matchers.NotNull
 
matches(Object) - Method in class org.mockito.internal.matchers.Null
 
matches(Object) - Method in class org.mockito.internal.matchers.Or
 
matches(Object) - Method in class org.mockito.internal.matchers.Same
 
matches(String) - Method in class org.mockito.internal.matchers.StartsWith
 
matches(Invocation) - Method in interface org.mockito.invocation.MatchableInvocation
Same method, mock and all arguments match.
matchesTypeSafe() - Static method in class org.mockito.internal.invocation.TypeSafeMatching
 
matchResult(int) - Method in class org.mockito.internal.matchers.CompareEqual
 
matchResult(int) - Method in class org.mockito.internal.matchers.CompareTo
 
matchResult(int) - Method in class org.mockito.internal.matchers.GreaterOrEqual
 
matchResult(int) - Method in class org.mockito.internal.matchers.GreaterThan
 
matchResult(int) - Method in class org.mockito.internal.matchers.LessOrEqual
 
matchResult(int) - Method in class org.mockito.internal.matchers.LessThan
 
MAX_LINE_LENGTH - Static variable in class org.mockito.internal.reporting.PrintSettings
 
maybeRedefineMockName(Object, String) - Static method in class org.mockito.internal.util.MockUtil
 
maybeVerifyLazily(VerificationMode) - Method in interface org.mockito.internal.progress.MockingProgress
 
maybeVerifyLazily(VerificationMode) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
maybeVerifyLazily(VerificationMode) - Method in interface org.mockito.verification.VerificationStrategy
Possibly wrap the given VerificationMode and return a wrapping VerificationMode instead.
methodDoesNotAcceptParameter(String, String) - Static method in class org.mockito.internal.exceptions.Reporter
 
MethodInvocationReport - Interface in org.mockito.listeners
Represent a method call on a mock.
MismatchReportingTestListener - Class in org.mockito.internal.junit
Reports stubbing argument mismatches to the supplied logger
MismatchReportingTestListener(MockitoLogger) - Constructor for class org.mockito.internal.junit.MismatchReportingTestListener
 
misplacedArgumentMatcher(List<LocalizedMatcher>) - Static method in class org.mockito.internal.exceptions.Reporter
 
MissingInvocationChecker - Class in org.mockito.internal.verification.checkers
 
missingMethodInvocation() - Static method in class org.mockito.internal.exceptions.Reporter
 
MissingMethodInvocationException - Exception in org.mockito.exceptions.misusing
 
MissingMethodInvocationException(String) - Constructor for exception org.mockito.exceptions.misusing.MissingMethodInvocationException
 
mock(Class<T>, MockSettings) - Method in class org.mockito.internal.MockitoCore
 
Mock - Annotation Type in org.mockito
Mark a field as a mock.
mock(Class<T>) - Static method in class org.mockito.Mockito
Creates mock object of given class or interface.
mock(Class<T>, String) - Static method in class org.mockito.Mockito
Specifies mock name.
mock(Class<T>, Answer) - Static method in class org.mockito.Mockito
Creates mock with a specified strategy for its answers to interactions.
mock(Class<T>, MockSettings) - Static method in class org.mockito.Mockito
Creates a mock with some non-standard settings.
mockable() - Method in interface org.mockito.plugins.MockMaker.TypeMockability
informs if type is mockable
MockAccess - Interface in org.mockito.internal.creation.bytebuddy
 
MockAnnotationProcessor - Class in org.mockito.internal.configuration
Instantiates a mock on a field annotated by Mock
MockAnnotationProcessor() - Constructor for class org.mockito.internal.configuration.MockAnnotationProcessor
 
MockAwareVerificationMode - Class in org.mockito.internal.verification
 
MockAwareVerificationMode(Object, VerificationMode, Set<VerificationListener>) - Constructor for class org.mockito.internal.verification.MockAwareVerificationMode
 
MockCandidateFilter - Interface in org.mockito.internal.configuration.injection.filter
 
mockClass(MockFeatures<T>) - Method in interface org.mockito.internal.creation.bytebuddy.BytecodeGenerator
 
mockClass(MockFeatures<T>) - Method in class org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator
 
MockCreationListener - Interface in org.mockito.listeners
Notified when mock object is created.
MockCreationSettings<T> - Interface in org.mockito.mock
Informs about the mock settings.
MockCreationValidator - Class in org.mockito.internal.util
 
MockCreationValidator() - Constructor for class org.mockito.internal.util.MockCreationValidator
 
mockedTypeIsInconsistentWithDelegatedInstanceType(Class<?>, Object) - Static method in class org.mockito.internal.exceptions.Reporter
 
mockedTypeIsInconsistentWithSpiedInstanceType(Class<?>, Object) - Static method in class org.mockito.internal.exceptions.Reporter
 
MockHandler<T> - Interface in org.mockito.invocation
Mockito handler of an invocation on a mock.
MockHandlerFactory - Class in org.mockito.internal.handler
by Szczepan Faber, created at: 5/21/12
MockHandlerFactory() - Constructor for class org.mockito.internal.handler.MockHandlerFactory
 
MockHandlerImpl<T> - Class in org.mockito.internal.handler
Invocation handler set on mock objects.
MockHandlerImpl(MockCreationSettings<T>) - Constructor for class org.mockito.internal.handler.MockHandlerImpl
 
mockingDetails(Object) - Method in class org.mockito.internal.MockitoCore
 
MockingDetails - Interface in org.mockito
Provides mocking information.
mockingDetails(Object) - Static method in class org.mockito.Mockito
Returns a MockingDetails instance that enables inspecting a particular object for Mockito related information.
MockingProgress - Interface in org.mockito.internal.progress
 
mockingProgress() - Static method in class org.mockito.internal.progress.ThreadSafeMockingProgress
Returns the MockingProgress for the current Thread.
MockingProgressImpl - Class in org.mockito.internal.progress
 
MockingProgressImpl() - Constructor for class org.mockito.internal.progress.MockingProgressImpl
 
mockingStarted(Object, MockCreationSettings) - Method in interface org.mockito.internal.progress.MockingProgress
 
mockingStarted(Object, MockCreationSettings) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
MockInjection - Class in org.mockito.internal.configuration.injection
Internal injection configuration utility.
MockInjection() - Constructor for class org.mockito.internal.configuration.injection.MockInjection
 
MockInjection.OngoingMockInjection - Class in org.mockito.internal.configuration.injection
Ongoing configuration of the mock injector.
MockInjectionStrategy - Class in org.mockito.internal.configuration.injection
Injector strategy contract
MockInjectionStrategy() - Constructor for class org.mockito.internal.configuration.injection.MockInjectionStrategy
 
Mockito - Class in org.mockito

Mockito logo

Mockito() - Constructor for class org.mockito.Mockito
 
MOCKITO_CONFIGURATION_CLASS_NAME - Static variable in class org.mockito.internal.configuration.ClassPathLoader
 
MockitoAnnotations - Class in org.mockito
MockitoAnnotations.initMocks(this); initializes fields annotated with Mockito annotations.
MockitoAnnotations() - Constructor for class org.mockito.MockitoAnnotations
 
MockitoAssertionError - Error in org.mockito.exceptions.base
Base class for verification errors emitted by Mockito.
MockitoAssertionError(String) - Constructor for error org.mockito.exceptions.base.MockitoAssertionError
 
MockitoAssertionError(MockitoAssertionError, String) - Constructor for error org.mockito.exceptions.base.MockitoAssertionError
Creates a copy of the given assertion error with the custom failure message prepended.
MockitoConfigurationException - Exception in org.mockito.exceptions.misusing
 
MockitoConfigurationException(String) - Constructor for exception org.mockito.exceptions.misusing.MockitoConfigurationException
 
MockitoConfigurationException(String, Exception) - Constructor for exception org.mockito.exceptions.misusing.MockitoConfigurationException
 
MockitoCore - Class in org.mockito.internal
 
MockitoCore() - Constructor for class org.mockito.internal.MockitoCore
 
MockitoDebugger - Interface in org.mockito
Deprecated.
- please use MockingDetails.printInvocations() instead. An instance of MockingDetails can be retrieved via Mockito.mockingDetails(Object).
MockitoDebuggerImpl - Class in org.mockito.internal.debugging
 
MockitoDebuggerImpl() - Constructor for class org.mockito.internal.debugging.MockitoDebuggerImpl
 
MockitoException - Exception in org.mockito.exceptions.base
Raised by mockito to emit an error either due to Mockito, or due to the User.
MockitoException(String, Throwable) - Constructor for exception org.mockito.exceptions.base.MockitoException
 
MockitoException(String) - Constructor for exception org.mockito.exceptions.base.MockitoException
 
MockitoFramework - Interface in org.mockito
Mockito framework settings and lifecycle listeners, for advanced users or for integrating with other frameworks.
MockitoHamcrest - Class in org.mockito.hamcrest
Allows matching arguments with hamcrest matchers.
MockitoHamcrest() - Constructor for class org.mockito.hamcrest.MockitoHamcrest
 
MockitoHint - Interface in org.mockito.quality
Stubbing hints were introduced in Mockito 2 in order to improve debuggability while keeping backwards compatibility.
MockitoInitializationException - Exception in org.mockito.exceptions.base
 
MockitoInitializationException(String) - Constructor for exception org.mockito.exceptions.base.MockitoInitializationException
 
MockitoInitializationException(String, Throwable) - Constructor for exception org.mockito.exceptions.base.MockitoInitializationException
 
MockitoJUnit - Class in org.mockito.junit
Mockito supports JUnit via: JUnit Rules - see MockitoRule JUnit runners - see MockitoJUnitRunner JUnit Jupiter extension
MockitoJUnit() - Constructor for class org.mockito.junit.MockitoJUnit
 
MockitoJUnitRunner - Class in org.mockito.junit
Mockito JUnit Runner keeps tests clean and improves debugging experience.
MockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner
 
MockitoJUnitRunner - Class in org.mockito.runners
Deprecated.
Moved to MockitoJUnitRunner, this class will be removed with Mockito 3
MockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.runners.MockitoJUnitRunner
Deprecated.
 
MockitoJUnitRunner.Silent - Class in org.mockito.junit
This Mockito JUnit Runner implementation *ignores* stubbing argument mismatches (MockitoJUnitRunner.StrictStubs) and *does not detect* unused stubbings.
MockitoJUnitRunner.Silent - Class in org.mockito.runners
Deprecated.
Moved to MockitoJUnitRunner.Silent, this class will be removed with Mockito 3
MockitoJUnitRunner.Strict - Class in org.mockito.junit
Detects unused stubs and reports them as failures.
MockitoJUnitRunner.Strict - Class in org.mockito.runners
Deprecated.
Moved to MockitoJUnitRunner.Strict, this class will be removed with Mockito 3
MockitoJUnitRunner.StrictStubs - Class in org.mockito.junit
Improves debugging tests, helps keeping the tests clean.
MockitoListener - Interface in org.mockito.listeners
Marker interface for all types of Mockito listeners.
MockitoLogger - Interface in org.mockito.internal.util
 
MockitoMethod - Interface in org.mockito.internal.invocation
 
MockitoMethodProxy - Interface in org.mockito.internal.creation.util
 
MockitoPlugins - Interface in org.mockito.plugins
Instance of this interface is available via MockitoFramework.getPlugins().
MockitoRule - Interface in org.mockito.junit
Mockito JUnit Rule helps keeping tests clean.
MockitoSerializationIssue - Exception in org.mockito.exceptions.base
Raised by mockito to emit an error either due to Mockito, or due to the User.
MockitoSerializationIssue(String, Exception) - Constructor for exception org.mockito.exceptions.base.MockitoSerializationIssue
 
mockitoSession() - Static method in class org.mockito.Mockito
MockitoSession is an optional, highly recommended feature that helps driving cleaner tests by eliminating boilerplate code and adding extra validation.
MockitoSession - Interface in org.mockito
MockitoSession is an optional, highly recommended feature that helps driving cleaner tests by eliminating boilerplate code and adding extra validation.
MockitoSessionBuilder - Interface in org.mockito.session
Fluent builder interface for MockitoSession objects.
MockitoSessionLogger - Interface in org.mockito.session
Logger for hints emitted when finishing mocking for a MockitoSession.
MockitoSessionLoggerAdapter - Class in org.mockito.internal.session
 
MockitoSessionLoggerAdapter(MockitoLogger) - Constructor for class org.mockito.internal.session.MockitoSessionLoggerAdapter
 
MockitoTestListener - Interface in org.mockito.internal.junit
Internal test listener that helps decoupling JUnit internals from Mockito "business" logic.
MockMaker - Interface in org.mockito.plugins
The facility to create mocks.
MockMaker.TypeMockability - Interface in org.mockito.plugins
Carries the mockability information
MockMethodAdvice - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodAdvice(WeakConcurrentMap<Object, MockMethodInterceptor>, String) - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodAdvice
 
MockMethodAdvice.ForReadObject - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodDispatcher - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodDispatcher() - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
MockMethodInterceptor - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodInterceptor(MockHandler, MockCreationSettings) - Constructor for class org.mockito.internal.creation.bytebuddy.MockMethodInterceptor
 
MockMethodInterceptor.DispatcherDefaultingToRealMethod - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodInterceptor.ForEquals - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodInterceptor.ForHashCode - Class in org.mockito.internal.creation.bytebuddy
 
MockMethodInterceptor.ForWriteReplace - Class in org.mockito.internal.creation.bytebuddy
 
mockName - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
MockName - Interface in org.mockito.mock
Represents the name of the mock as shown in the verification failure reports, etc.
MockNameImpl - Class in org.mockito.internal.util
 
MockNameImpl(String, Class<?>) - Constructor for class org.mockito.internal.util.MockNameImpl
 
MockNameImpl(String) - Constructor for class org.mockito.internal.util.MockNameImpl
 
MockReference<T> - Interface in org.mockito.internal.invocation.mockref
To avoid memory leaks for certain implementations of MockMaker, we need to use weak mock references internally.
MockScanner - Class in org.mockito.internal.configuration.injection.scanner
Scan mocks, and prepare them if needed.
MockScanner(Object, Class<?>) - Constructor for class org.mockito.internal.configuration.injection.scanner.MockScanner
Creates a MockScanner.
MockSettings - Interface in org.mockito
Allows mock creation with additional mock settings.
MockSettingsImpl<T> - Class in org.mockito.internal.creation
 
MockSettingsImpl() - Constructor for class org.mockito.internal.creation.MockSettingsImpl
 
mocksHaveToBePassedToVerifyNoMoreInteractions() - Static method in class org.mockito.internal.exceptions.Reporter
 
mocksHaveToBePassedWhenCreatingInOrder() - Static method in class org.mockito.internal.exceptions.Reporter
 
MockStrongReference<T> - Class in org.mockito.internal.invocation.mockref
 
MockStrongReference(T, boolean) - Constructor for class org.mockito.internal.invocation.mockref.MockStrongReference
 
MockUtil - Class in org.mockito.internal.util
 
MockWeakReference<T> - Class in org.mockito.internal.invocation.mockref
A weak reference that is converted into a strong reference when serialized.
MockWeakReference(T) - Constructor for class org.mockito.internal.invocation.mockref.MockWeakReference
 
MoreThanAllowedActualInvocations - Error in org.mockito.exceptions.verification
Thrown when atMost(x) verification fails.
MoreThanAllowedActualInvocations(String) - Constructor for error org.mockito.exceptions.verification.MoreThanAllowedActualInvocations
 
moreThanOneAnnotationNotAllowed(String) - Static method in class org.mockito.internal.exceptions.Reporter
 

N

name(String) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
name - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
name(String) - Method in class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
name() - Method in class org.mockito.internal.util.reflection.InstanceField
Returns the name of the field.
name(String) - Method in interface org.mockito.MockSettings
Specifies mock name.
name(String) - Method in interface org.mockito.session.MockitoSessionBuilder
Configures the name of the MockitoSession instance.
NameBasedCandidateFilter - Class in org.mockito.internal.configuration.injection.filter
 
NameBasedCandidateFilter(MockCandidateFilter) - Constructor for class org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter
 
names() - Method in class org.mockito.internal.util.reflection.Fields.InstanceFields
 
never() - Method in class org.mockito.internal.verification.VerificationWrapper
 
never() - Static method in class org.mockito.Mockito
Alias to times(0), see Mockito.times(int)
never() - Method in class org.mockito.verification.Timeout
 
never() - Method in interface org.mockito.verification.VerificationAfterDelay
Allows verification that there are no invocations at any point during the given period.
NeverWantedButInvoked - Error in org.mockito.exceptions.verification
 
NeverWantedButInvoked(String) - Constructor for error org.mockito.exceptions.verification.NeverWantedButInvoked
 
neverWantedButInvoked(DescribedInvocation, List<Location>) - Static method in class org.mockito.internal.exceptions.Reporter
 
newInstance(Class<T>) - Method in interface org.mockito.creation.instance.Instantiator
Creates instance of given class
newInstance(Class<T>) - Method in class org.mockito.internal.creation.instance.ConstructorInstantiator
 
newInstance(Class<T>) - Method in interface org.mockito.internal.creation.instance.Instantiator
Deprecated.
Creates instance of given class
newInstance(String, Object...) - Method in class org.mockito.internal.runners.util.RunnerProvider
 
newMockSafeHashSet(Iterable<Object>) - Static method in class org.mockito.internal.util.collections.Sets
 
newMockSafeHashSet(Object...) - Static method in class org.mockito.internal.util.collections.Sets
 
newSet(T...) - Static method in class org.mockito.internal.util.collections.Sets
 
next() - Static method in class org.mockito.internal.progress.SequenceNumber
 
NO_OP - Static variable in class org.mockito.internal.invocation.InterceptedInvocation
 
noArgumentValueWasCaptured() - Static method in class org.mockito.internal.exceptions.Reporter
 
NoInteractionsWanted - Error in org.mockito.exceptions.verification
No interactions wanted.
NoInteractionsWanted(String) - Constructor for error org.mockito.exceptions.verification.NoInteractionsWanted
 
NoMoreInteractions - Class in org.mockito.internal.verification
 
NoMoreInteractions() - Constructor for class org.mockito.internal.verification.NoMoreInteractions
 
noMoreInteractions() - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
noMoreInteractionsWanted(Invocation, List<VerificationAwareInvocation>) - Static method in class org.mockito.internal.exceptions.Reporter
 
noMoreInteractionsWantedInOrder(Invocation) - Static method in class org.mockito.internal.exceptions.Reporter
 
nonMockableReason() - Method in interface org.mockito.plugins.MockMaker.TypeMockability
informs why type is not mockable
NoOpTestListener - Class in org.mockito.internal.junit
 
NoOpTestListener() - Constructor for class org.mockito.internal.junit.NoOpTestListener
 
nop - Static variable in interface org.mockito.internal.configuration.injection.filter.OngoingInjector
Injector that will do nothing, and will return null as no mocks will be injected
nop() - Static method in class org.mockito.internal.configuration.injection.MockInjectionStrategy
NOP Strategy that will always try the next strategy.
not(T) - Static method in class org.mockito.AdditionalMatchers
Object argument that does not match the given argument matcher.
not(short) - Static method in class org.mockito.AdditionalMatchers
short argument that does not match the given argument matcher.
not(int) - Static method in class org.mockito.AdditionalMatchers
int argument that does not match the given argument matcher.
not(long) - Static method in class org.mockito.AdditionalMatchers
long argument that does not match the given argument matcher.
not(float) - Static method in class org.mockito.AdditionalMatchers
float argument that does not match the given argument matcher.
not(double) - Static method in class org.mockito.AdditionalMatchers
double argument that does not match the given argument matcher.
not(char) - Static method in class org.mockito.AdditionalMatchers
char argument that does not match the given argument matcher.
not(boolean) - Static method in class org.mockito.AdditionalMatchers
boolean argument that does not match the given argument matcher.
not(byte) - Static method in class org.mockito.AdditionalMatchers
byte argument that does not match the given argument matcher.
Not - Class in org.mockito.internal.matchers
 
Not(ArgumentMatcher<?>) - Constructor for class org.mockito.internal.matchers.Not
 
NOT_NULL - Static variable in class org.mockito.internal.matchers.NotNull
 
NotAMockException - Exception in org.mockito.exceptions.misusing
 
NotAMockException(String) - Constructor for exception org.mockito.exceptions.misusing.NotAMockException
 
notAMockPassedToVerify(Class<?>) - Static method in class org.mockito.internal.exceptions.Reporter
 
notAMockPassedToVerifyNoMoreInteractions() - Static method in class org.mockito.internal.exceptions.Reporter
 
notAMockPassedToWhenMethod() - Static method in class org.mockito.internal.exceptions.Reporter
 
notAMockPassedWhenCreatingInOrder() - Static method in class org.mockito.internal.exceptions.Reporter
 
notAnException() - Static method in class org.mockito.internal.exceptions.Reporter
 
NotExtensible - Annotation Type in org.mockito
Indicates to the user that she should not provide custom implementations of given type.
NotifiedMethodInvocationReport - Class in org.mockito.internal.handler
Report on a method call
NotifiedMethodInvocationReport(Invocation, Object) - Constructor for class org.mockito.internal.handler.NotifiedMethodInvocationReport
Build a new MethodInvocationReport with a return value.
NotifiedMethodInvocationReport(Invocation, Throwable) - Constructor for class org.mockito.internal.handler.NotifiedMethodInvocationReport
Build a new MethodInvocationReport with a return value.
notifyStubbedAnswerLookup(Invocation, Stubbing, Collection<Stubbing>, CreationSettings) - Static method in class org.mockito.internal.listeners.StubbingLookupNotifier
 
notifyVerificationStarted(List<VerificationStartedListener>, MockingDetails) - Static method in class org.mockito.internal.listeners.VerificationStartedNotifier
 
notNull() - Static method in class org.mockito.ArgumentMatchers
Not null argument.
notNull(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Deprecated.
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic friendliness to avoid casting, this is not anymore needed in Java 8.
NotNull - Class in org.mockito.internal.matchers
 
notNull() - Method in class org.mockito.internal.util.reflection.Fields.InstanceFields
 
Null - Class in org.mockito.internal.matchers
 
NULL - Static variable in class org.mockito.internal.matchers.Null
 
nullable(Class<T>) - Static method in class org.mockito.ArgumentMatchers
Argument that is either null or of the given type.
NullInsteadOfMockException - Exception in org.mockito.exceptions.misusing
 
NullInsteadOfMockException(String) - Constructor for exception org.mockito.exceptions.misusing.NullInsteadOfMockException
 
nullPassedToVerify() - Static method in class org.mockito.internal.exceptions.Reporter
 
nullPassedToVerifyNoMoreInteractions() - Static method in class org.mockito.internal.exceptions.Reporter
 
nullPassedToWhenMethod() - Static method in class org.mockito.internal.exceptions.Reporter
 
nullPassedWhenCreatingInOrder() - Static method in class org.mockito.internal.exceptions.Reporter
 
NumberOfInvocationsChecker - Class in org.mockito.internal.verification.checkers
 

O

ObjectMethodsGuru - Class in org.mockito.internal.util
 
of(Object) - Static method in class org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper
 
of(Object...) - Static method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
of(Iterable<Object>) - Static method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
onField(Field, Object) - Static method in class org.mockito.internal.configuration.injection.MockInjection
Create a new configuration setup for a field
onFields(Set<Field>, Object) - Static method in class org.mockito.internal.configuration.injection.MockInjection
Create a new configuration setup for fields
OngoingInjector - Interface in org.mockito.internal.configuration.injection.filter
Allow the ongoing injection of a mock candidate.
OngoingStubbing<T> - Interface in org.mockito.stubbing
Simply put: "When the x method is called then return y".
OngoingStubbingImpl<T> - Class in org.mockito.internal.stubbing
 
OngoingStubbingImpl(InvocationContainerImpl) - Constructor for class org.mockito.internal.stubbing.OngoingStubbingImpl
 
onInjection(Object, Class<?>, Set<Field>, Set<Object>) - Method in class org.mockito.internal.configuration.InjectingAnnotationEngine
 
Only - Class in org.mockito.internal.verification
 
Only() - Constructor for class org.mockito.internal.verification.Only
 
only() - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
only() - Method in class org.mockito.internal.verification.VerificationWrapper
 
only() - Static method in class org.mockito.Mockito
Allows checking if given method was the only one invoked.
only() - Method in interface org.mockito.verification.VerificationAfterDelay
Verifies that there the given method is invoked and is the only method invoked.
only() - Method in interface org.mockito.verification.VerificationWithTimeout
Allows checking if given method was the only one invoked.
onlyVoidMethodsCanBeSetToDoNothing() - Static method in class org.mockito.internal.exceptions.Reporter
 
onMockCreated(Object, MockCreationSettings) - Method in class org.mockito.internal.junit.MismatchReportingTestListener
 
onMockCreated(Object, MockCreationSettings) - Method in class org.mockito.internal.junit.NoOpTestListener
 
onMockCreated(Object, MockCreationSettings) - Method in class org.mockito.internal.junit.StrictStubsRunnerTestListener
 
onMockCreated(Object, MockCreationSettings) - Method in class org.mockito.internal.junit.UniversalTestListener
 
onMockCreated(Object, MockCreationSettings) - Method in class org.mockito.internal.junit.UnnecessaryStubbingsReporter
 
onMockCreated(Object, MockCreationSettings) - Method in interface org.mockito.listeners.MockCreationListener
Mock object was just created.
onStubbingLookup(StubbingLookupEvent) - Method in interface org.mockito.internal.listeners.StubbingLookupListener
Called by the framework when Mockito looked up an answer for invocation on a mock.
onVerification(VerificationEvent) - Method in interface org.mockito.listeners.VerificationListener
Called after a verification happened.
onVerificationStarted(VerificationStartedEvent) - Method in interface org.mockito.listeners.VerificationStartedListener
Triggered when the user calls Mockito.verify().
or(boolean, boolean) - Static method in class org.mockito.AdditionalMatchers
boolean argument that matches any of the given argument matchers.
or(T, T) - Static method in class org.mockito.AdditionalMatchers
Object argument that matches any of the given argument matchers.
or(short, short) - Static method in class org.mockito.AdditionalMatchers
short argument that matches any of the given argument matchers.
or(long, long) - Static method in class org.mockito.AdditionalMatchers
long argument that matches any of the given argument matchers.
or(int, int) - Static method in class org.mockito.AdditionalMatchers
int argument that matches any of the given argument matchers.
or(float, float) - Static method in class org.mockito.AdditionalMatchers
float argument that matches any of the given argument matchers.
or(double, double) - Static method in class org.mockito.AdditionalMatchers
double argument that matches any of the given argument matchers.
or(char, char) - Static method in class org.mockito.AdditionalMatchers
char argument that matches any of the given argument matchers.
or(byte, byte) - Static method in class org.mockito.AdditionalMatchers
byte argument that matches any of the given argument matchers.
Or - Class in org.mockito.internal.matchers
 
Or(ArgumentMatcher<?>, ArgumentMatcher<?>) - Constructor for class org.mockito.internal.matchers.Or
 
org.mockito - package org.mockito
Mockito is a mock library for java - see Mockito class for usage.
org.mockito.codegen - package org.mockito.codegen
 
org.mockito.configuration - package org.mockito.configuration
Mockito configuration utilities.
org.mockito.creation.instance - package org.mockito.creation.instance
 
org.mockito.exceptions - package org.mockito.exceptions
Mockito exceptions utilities
org.mockito.exceptions.base - package org.mockito.exceptions.base
Base classes for exceptions and errors, stack trace filtering/removing logic.
org.mockito.exceptions.misusing - package org.mockito.exceptions.misusing
Exceptions thrown when Mockito is misused.
org.mockito.exceptions.stacktrace - package org.mockito.exceptions.stacktrace
Stack trace filtering / cleaning public APIs.
org.mockito.exceptions.verification - package org.mockito.exceptions.verification
Verification errors.
org.mockito.exceptions.verification.junit - package org.mockito.exceptions.verification.junit
JUnit integration to provide better support for junit runners in IDEs.
org.mockito.hamcrest - package org.mockito.hamcrest
Mockito Hamcrest matcher integration.
org.mockito.internal - package org.mockito.internal
Internal classes, not to be used by clients.
org.mockito.internal.configuration - package org.mockito.internal.configuration
Mockito configuration.
org.mockito.internal.configuration.injection - package org.mockito.internal.configuration.injection
Mockito injection internals.
org.mockito.internal.configuration.injection.filter - package org.mockito.internal.configuration.injection.filter
 
org.mockito.internal.configuration.injection.scanner - package org.mockito.internal.configuration.injection.scanner
 
org.mockito.internal.configuration.plugins - package org.mockito.internal.configuration.plugins
Mockito plugins configuration machinery.
org.mockito.internal.creation - package org.mockito.internal.creation
Mock object creation.
org.mockito.internal.creation.bytebuddy - package org.mockito.internal.creation.bytebuddy
ByteBuddy related stuff.
org.mockito.internal.creation.instance - package org.mockito.internal.creation.instance
 
org.mockito.internal.creation.settings - package org.mockito.internal.creation.settings
 
org.mockito.internal.creation.util - package org.mockito.internal.creation.util
Stuff that does not have a good package yet.
org.mockito.internal.debugging - package org.mockito.internal.debugging
Whatever helps in debugging failed tests.
org.mockito.internal.exceptions - package org.mockito.internal.exceptions
 
org.mockito.internal.exceptions.stacktrace - package org.mockito.internal.exceptions.stacktrace
Stack trace filtering / cleaning internal APIs.
org.mockito.internal.exceptions.util - package org.mockito.internal.exceptions.util
 
org.mockito.internal.framework - package org.mockito.internal.framework
 
org.mockito.internal.hamcrest - package org.mockito.internal.hamcrest
 
org.mockito.internal.handler - package org.mockito.internal.handler
 
org.mockito.internal.invocation - package org.mockito.internal.invocation
Invocation machinery and related classes.
org.mockito.internal.invocation.finder - package org.mockito.internal.invocation.finder
 
org.mockito.internal.invocation.mockref - package org.mockito.internal.invocation.mockref
 
org.mockito.internal.junit - package org.mockito.internal.junit
JUnit integration support classes.
org.mockito.internal.junit.util - package org.mockito.internal.junit.util
 
org.mockito.internal.listeners - package org.mockito.internal.listeners
 
org.mockito.internal.matchers - package org.mockito.internal.matchers
Argument matchers for verification and stubbing.
org.mockito.internal.matchers.apachecommons - package org.mockito.internal.matchers.apachecommons
Argument matchers that use Apache Commons Lang reflection-equality.
org.mockito.internal.matchers.text - package org.mockito.internal.matchers.text
 
org.mockito.internal.progress - package org.mockito.internal.progress
Mocking progress stateful classes.
org.mockito.internal.reporting - package org.mockito.internal.reporting
Deals with nicely printing verification errors.
org.mockito.internal.runners - package org.mockito.internal.runners
Internal classes for runners implementations.
org.mockito.internal.runners.util - package org.mockito.internal.runners.util
Internal utils for runner implementations.
org.mockito.internal.session - package org.mockito.internal.session
 
org.mockito.internal.stubbing - package org.mockito.internal.stubbing
Stubbing logic.
org.mockito.internal.stubbing.answers - package org.mockito.internal.stubbing.answers
Answers for stubbed calls.
org.mockito.internal.stubbing.defaultanswers - package org.mockito.internal.stubbing.defaultanswers
Implementations of default Answers.
org.mockito.internal.util - package org.mockito.internal.util
Static utils
org.mockito.internal.util.collections - package org.mockito.internal.util.collections
 
org.mockito.internal.util.concurrent - package org.mockito.internal.util.concurrent
 
org.mockito.internal.util.io - package org.mockito.internal.util.io
 
org.mockito.internal.util.reflection - package org.mockito.internal.util.reflection
Reflection utilities.
org.mockito.internal.verification - package org.mockito.internal.verification
Verification logic.
org.mockito.internal.verification.api - package org.mockito.internal.verification.api
This package should be open to public once verification API is fully finished.
org.mockito.internal.verification.argumentmatching - package org.mockito.internal.verification.argumentmatching
Deals with matching arguments.
org.mockito.internal.verification.checkers - package org.mockito.internal.verification.checkers
Verification checkers.
org.mockito.invocation - package org.mockito.invocation
Public API related to mock method invocations.
org.mockito.junit - package org.mockito.junit
Mockito JUnit integration ; rule and runners.
org.mockito.listeners - package org.mockito.listeners
Public classes relative to the listener APIs.
org.mockito.mock - package org.mockito.mock
Mock settings related classes.
org.mockito.plugins - package org.mockito.plugins
Mockito plugins allow customization of behavior.
org.mockito.quality - package org.mockito.quality
Mocking quality related classes.
org.mockito.runners - package org.mockito.runners
JUnit runners.
org.mockito.session - package org.mockito.session
 
org.mockito.stubbing - package org.mockito.stubbing
Stubbing related classes.
org.mockito.verification - package org.mockito.verification
Verification related classes.
OS_NAME - Static variable in class org.mockito.internal.util.Platform
 
OS_VERSION - Static variable in class org.mockito.internal.util.Platform
 
outerInstance(Object) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
outerInstance(Object) - Method in interface org.mockito.MockSettings
Makes it possible to mock non-static inner classes in conjunction with MockSettings.useConstructor(Object...).

P

Platform - Class in org.mockito.internal.util
 
Plugins - Class in org.mockito.internal.configuration.plugins
Access to Mockito behavior that can be reconfigured by plugins
Plugins() - Constructor for class org.mockito.internal.configuration.plugins.Plugins
 
PluginSwitch - Interface in org.mockito.plugins
Allows switching off the plugins that are discovered on classpath.
pluralize(int) - Static method in class org.mockito.internal.reporting.Pluralizer
 
Pluralizer - Class in org.mockito.internal.reporting
 
Pluralizer() - Constructor for class org.mockito.internal.reporting.Pluralizer
 
PotentialStubbingProblem - Exception in org.mockito.exceptions.misusing
PotentialStubbingProblem improves productivity by failing the test early when the user misconfigures mock's stubbing.
PotentialStubbingProblem(String) - Constructor for exception org.mockito.exceptions.misusing.PotentialStubbingProblem
 
potentialStubbingProblem(Invocation, Collection<Invocation>) - Static method in class org.mockito.internal.exceptions.Reporter
 
Primitives - Class in org.mockito.internal.util
 
Primitives() - Constructor for class org.mockito.internal.util.Primitives
 
primitiveTypeOf(Class<T>) - Static method in class org.mockito.internal.util.Primitives
Returns the primitive type of the given class.
print() - Method in class org.mockito.internal.debugging.WarningsPrinterImpl
 
print(List<VerificationAwareInvocation>) - Method in class org.mockito.internal.exceptions.util.ScenarioPrinter
 
print(Object) - Static method in class org.mockito.internal.matchers.text.ValuePrinter
Prints given value so that it is neatly readable by humans.
print(List<ArgumentMatcher>, Invocation) - Method in class org.mockito.internal.reporting.PrintSettings
 
print(Invocation) - Method in class org.mockito.internal.reporting.PrintSettings
 
print(MatchableInvocation) - Method in class org.mockito.internal.reporting.PrintSettings
 
printInvocations(Object) - Method in class org.mockito.internal.debugging.InvocationsPrinter
 
printInvocations(Object...) - Method in class org.mockito.internal.debugging.MockitoDebuggerImpl
Deprecated.
printInvocations() - Method in class org.mockito.internal.util.DefaultMockingDetails
 
printInvocations() - Method in interface org.mockito.MockingDetails
Returns printing-friendly list of the invocations that occurred with the mock object.
printInvocations(Object...) - Method in interface org.mockito.MockitoDebugger
Deprecated.
- please use MockingDetails.printInvocations() instead. An instance of MockingDetails can be retrieved via Mockito.mockingDetails(Object).
printMethodReturnType() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
PrintSettings - Class in org.mockito.internal.reporting
 
PrintSettings() - Constructor for class org.mockito.internal.reporting.PrintSettings
 
printValues(String, String, String, Iterator<?>) - Static method in class org.mockito.internal.matchers.text.ValuePrinter
Print values in a nice format, e.g.
process(Captor, Field) - Method in class org.mockito.internal.configuration.CaptorAnnotationProcessor
 
process(A, Field) - Method in interface org.mockito.internal.configuration.FieldAnnotationProcessor
 
process(Class<?>, Object) - Method in class org.mockito.internal.configuration.IndependentAnnotationEngine
 
process(Class<?>, Object) - Method in class org.mockito.internal.configuration.InjectingAnnotationEngine
Process the fields of the test instance and create Mocks, Spies, Captors and inject them on fields annotated @InjectMocks.
process(Field, Object, Set<Object>) - Method in class org.mockito.internal.configuration.injection.MockInjectionStrategy
Actually inject mockCandidates on field.
process(Mock, Field) - Method in class org.mockito.internal.configuration.MockAnnotationProcessor
 
process(Class<?>, Object) - Method in class org.mockito.internal.configuration.SpyAnnotationEngine
 
process(Class<?>, Object) - Method in interface org.mockito.plugins.AnnotationEngine
Processes the test instance to configure annotated members.
processAnnotationForMock(Mock, Class<?>, String) - Static method in class org.mockito.internal.configuration.MockAnnotationProcessor
 
processInjection(Field, Object, Set<Object>) - Method in class org.mockito.internal.configuration.injection.ConstructorInjection
 
processInjection(Field, Object, Set<Object>) - Method in class org.mockito.internal.configuration.injection.MockInjectionStrategy
Process actual injection.
processInjection(Field, Object, Set<Object>) - Method in class org.mockito.internal.configuration.injection.PropertyAndSetterInjection
 
processInjection(Field, Object, Set<Object>) - Method in class org.mockito.internal.configuration.injection.SpyOnInjectedFieldsHandler
 
PropertyAndSetterInjection - Class in org.mockito.internal.configuration.injection
Inject mocks using first setters then fields, if no setters available.
PropertyAndSetterInjection() - Constructor for class org.mockito.internal.configuration.injection.PropertyAndSetterInjection
 
pullLocalizedMatchers() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
pullLocalizedMatchers() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
pullOngoingStubbing() - Method in interface org.mockito.internal.progress.MockingProgress
 
pullOngoingStubbing() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
pullVerificationMode() - Method in interface org.mockito.internal.progress.MockingProgress
 
pullVerificationMode() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
pushTo(Thread) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
put(K, V) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
put(K, V) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 

R

rawExtraInterfaces() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
rawType() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
read() - Method in class org.mockito.internal.util.reflection.FieldReader
 
read() - Method in class org.mockito.internal.util.reflection.InstanceField
Safely read the field.
readLines(InputStream) - Static method in class org.mockito.internal.util.io.IOUtil
 
RealMethod - Interface in org.mockito.internal.invocation
Interface that wraps a 'real' method of the mock object.
RealMethod.FromBehavior - Class in org.mockito.internal.invocation
 
RealMethod.FromCallable - Class in org.mockito.internal.invocation
 
RealMethod.IsIllegal - Enum in org.mockito.internal.invocation
 
RedundantListenerException - Exception in org.mockito.exceptions.misusing
Reported when instance of MockitoListener is being added to Mockito (see MockitoFramework) and there is already a listener with this implementation type registered.
RedundantListenerException(String) - Constructor for exception org.mockito.exceptions.misusing.RedundantListenerException
 
redundantMockitoListener(String) - Static method in class org.mockito.internal.exceptions.Reporter
 
refEq(T, String...) - Static method in class org.mockito.ArgumentMatchers
Object argument that is reflection-equal to the given value with support for excluding selected fields from a class.
ReflectionEquals - Class in org.mockito.internal.matchers.apachecommons
 
ReflectionEquals(Object, String...) - Constructor for class org.mockito.internal.matchers.apachecommons.ReflectionEquals
 
registerAllTypeVariables(Type) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
Registers the type variables for the given type and all of its superclasses and superinterfaces.
RegisteredInvocations - Interface in org.mockito.internal.verification
 
registerTypeParametersOn(TypeVariable<?>[]) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
registerTypeVariablesOn(Type) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
 
remove(Object) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
remove(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
remove(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 
remove(V) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
 
removeAll(Collection<?>) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
removeFirstLine(String) - Static method in class org.mockito.internal.util.StringUtil
 
removeLast() - Method in class org.mockito.internal.verification.DefaultRegisteredInvocations
 
removeLast() - Method in interface org.mockito.internal.verification.RegisteredInvocations
 
removeLast() - Method in class org.mockito.internal.verification.SingleRegisteredInvocation
 
removeListener(MockitoListener) - Method in class org.mockito.internal.framework.DefaultMockitoFramework
 
removeListener(MockitoListener) - Method in interface org.mockito.internal.progress.MockingProgress
 
removeListener(MockitoListener) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
removeListener(MockitoListener) - Method in interface org.mockito.MockitoFramework
When you add listener using MockitoFramework.addListener(MockitoListener) make sure to remove it.
reportAnd() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportAnd() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
Reporter - Class in org.mockito.internal.exceptions
Reports verification and misusing errors.
reportInvocation(MethodInvocationReport) - Method in class org.mockito.internal.debugging.VerboseMockInvocationLogger
 
reportInvocation(MethodInvocationReport) - Method in interface org.mockito.listeners.InvocationListener
Called after the invocation of the listener's mock if it returned normally.
reportMatcher(ArgumentMatcher<?>) - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportMatcher(ArgumentMatcher<?>) - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
reportNoSubMatchersFound(String) - Static method in class org.mockito.internal.exceptions.Reporter
 
reportNot() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportNot() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
reportOngoingStubbing(OngoingStubbing<?>) - Method in interface org.mockito.internal.progress.MockingProgress
 
reportOngoingStubbing(OngoingStubbing) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
reportOr() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportOr() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
reset(T...) - Method in class org.mockito.internal.MockitoCore
 
reset() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reset() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
reset() - Method in interface org.mockito.internal.progress.MockingProgress
 
reset() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
reset(T...) - Static method in class org.mockito.Mockito
Smart Mockito users hardly use this feature because they know it could be a sign of poor tests.
resetInvocationForPotentialStubbing(MatchableInvocation) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
 
resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
 
resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
resetMock(T) - Static method in class org.mockito.internal.util.MockUtil
 
resetMock(Object, MockHandler, MockCreationSettings) - Method in interface org.mockito.plugins.MockMaker
Replaces the existing handler on mock with newHandler.
resetOngoingStubbing() - Method in interface org.mockito.internal.progress.MockingProgress
Removes ongoing stubbing so that in case the framework is misused state validation errors are more accurate
resetOngoingStubbing() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
resolveGenericReturnType(Method) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
Resolve current method generic return type to a GenericMetadataSupport.
resolveStrategy(Class<?>, ClassLoader, boolean) - Method in interface org.mockito.internal.creation.bytebuddy.SubclassLoader
Resolves a class loading strategy.
resolveTypeInstances(Class<?>...) - Method in interface org.mockito.internal.util.reflection.FieldInitializer.ConstructorArgumentResolver
Try to resolve instances from types.
retainAll(Collection<?>) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
Returns - Class in org.mockito.internal.stubbing.answers
 
Returns(Object) - Constructor for class org.mockito.internal.stubbing.answers.Returns
 
RETURNS_DEEP_STUBS - Static variable in class org.mockito.Mockito
Optional Answer to be used with Mockito.mock(Class, Answer).
RETURNS_DEFAULTS - Static variable in class org.mockito.Mockito
The default Answer of every mock if the mock was not stubbed.
RETURNS_MOCKS - Static variable in class org.mockito.Mockito
Optional Answer to be used with Mockito.mock(Class, Answer)
RETURNS_SELF - Static variable in class org.mockito.Mockito
Optional Answer to be used with Mockito.mock(Class, Answer).
RETURNS_SMART_NULLS - Static variable in class org.mockito.Mockito
Optional Answer to be used with Mockito.mock(Class, Answer).
returnsArgAt(int) - Static method in class org.mockito.AdditionalAnswers
Returns the parameter of an invocation at the given position.
ReturnsArgumentAt - Class in org.mockito.internal.stubbing.answers
Returns the passed parameter identity at specified index.
ReturnsArgumentAt(int) - Constructor for class org.mockito.internal.stubbing.answers.ReturnsArgumentAt
Build the identity answer to return the argument at the given position in the argument array.
ReturnsDeepStubs - Class in org.mockito.internal.stubbing.defaultanswers
Returning deep stub implementation.
ReturnsDeepStubs() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs
 
returnsElementsOf(Collection<?>) - Static method in class org.mockito.AdditionalAnswers
Returns elements of the collection.
ReturnsElementsOf - Class in org.mockito.internal.stubbing.answers
Returns elements of the collection.
ReturnsElementsOf(Collection<?>) - Constructor for class org.mockito.internal.stubbing.answers.ReturnsElementsOf
 
ReturnsEmptyValues - Class in org.mockito.internal.stubbing.defaultanswers
Default answer of every Mockito mock.
ReturnsEmptyValues() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues
 
returnsFirstArg() - Static method in class org.mockito.AdditionalAnswers
Returns the first parameter of an invocation.
returnsLastArg() - Static method in class org.mockito.AdditionalAnswers
Returns the last parameter of an invocation.
ReturnsMocks - Class in org.mockito.internal.stubbing.defaultanswers
 
ReturnsMocks() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsMocks
 
ReturnsMoreEmptyValues - Class in org.mockito.internal.stubbing.defaultanswers
It's likely this implementation will be used by default by every Mockito 3.0.0 mock.
ReturnsMoreEmptyValues() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsMoreEmptyValues
 
returnsPrimitive() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
 
returnsSecondArg() - Static method in class org.mockito.AdditionalAnswers
Returns the second parameter of an invocation.
ReturnsSmartNulls - Class in org.mockito.internal.stubbing.defaultanswers
Optional Answer that can be used with Mockito.mock(Class, Answer)
ReturnsSmartNulls() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsSmartNulls
 
rule() - Static method in class org.mockito.junit.MockitoJUnit
Creates rule instance that initiates @Mocks For more details and examples see MockitoRule.
run(RunNotifier) - Method in class org.mockito.internal.runners.DefaultInternalRunner
 
run(RunNotifier) - Method in interface org.mockito.internal.runners.InternalRunner
 
run(RunNotifier) - Method in class org.mockito.internal.runners.StrictRunner
 
run() - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
run() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
run() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
 
run(RunNotifier) - Method in class org.mockito.junit.MockitoJUnitRunner
 
run(RunNotifier) - Method in class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
Deprecated.
 
run(RunNotifier) - Method in class org.mockito.runners.MockitoJUnitRunner
Deprecated.
run(RunNotifier) - Method in class org.mockito.runners.VerboseMockitoJUnitRunner
Deprecated.
 
RunnerFactory - Class in org.mockito.internal.runners
Creates instances of Mockito JUnit Runner in a safe way, e.g.
RunnerFactory() - Constructor for class org.mockito.internal.runners.RunnerFactory
 
RunnerProvider - Class in org.mockito.internal.runners.util
 
RunnerProvider() - Constructor for class org.mockito.internal.runners.util.RunnerProvider
 

S

safelyDisableAccess(AccessibleObject) - Method in class org.mockito.internal.util.reflection.AccessibilityChanger
safely disables access
same(T) - Static method in class org.mockito.ArgumentMatchers
Object argument that is the same as the given value.
Same - Class in org.mockito.internal.matchers
 
Same(Object) - Constructor for class org.mockito.internal.matchers.Same
 
ScenarioPrinter - Class in org.mockito.internal.exceptions.util
 
ScenarioPrinter() - Constructor for class org.mockito.internal.exceptions.util.ScenarioPrinter
 
SequenceNumber - Class in org.mockito.internal.progress
 
SequenceNumber() - Constructor for class org.mockito.internal.progress.SequenceNumber
 
serializable() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
serializable(SerializableMode) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
serializable() - Method in interface org.mockito.MockSettings
Configures the mock to be serializable.
serializable(SerializableMode) - Method in interface org.mockito.MockSettings
Configures the mock to be serializable with a specific serializable mode.
SerializableMethod - Class in org.mockito.internal.invocation
 
SerializableMethod(Method) - Constructor for class org.mockito.internal.invocation.SerializableMethod
 
serializableMode - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
SerializableMode - Enum in org.mockito.mock
Mock serializable style.
serializableWontWorkForObjectsThatDontImplementSerializable(Class<?>) - Static method in class org.mockito.internal.exceptions.Reporter
 
set(String, MockMethodDispatcher) - Static method in class org.mockito.internal.creation.bytebuddy.MockMethodDispatcher
 
set(T) - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
 
set(Object) - Method in class org.mockito.internal.util.reflection.BeanPropertySetter
Set the value to the property represented by this BeanPropertySetter
set(Object) - Method in class org.mockito.internal.util.reflection.InstanceField
Set the given value to the field of this instance.
setAnswersForStubbing(List<Answer<?>>, Strictness) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
Sets the answers declared with 'doAnswer' style.
setExtraInterfaces(Set<Class<?>>) - Method in class org.mockito.internal.creation.settings.CreationSettings
 
setField(Object, Field, Object) - Static method in class org.mockito.internal.util.reflection.FieldSetter
 
setInvocationForPotentialStubbing(MatchableInvocation) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
setListenerDirty() - Method in class org.mockito.internal.junit.UniversalTestListener
Marks listener as dirty, scheduled for cleanup when the next session starts
setMatchersToBeDescribedWithExtraTypeInfo(Integer[]) - Method in class org.mockito.internal.reporting.PrintSettings
 
setMethodForStubbing(MatchableInvocation) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
setMock(Object) - Method in interface org.mockito.listeners.VerificationStartedEvent
Replaces existing mock object for verification with a different one.
setMockitoInterceptor(MockMethodInterceptor) - Method in interface org.mockito.internal.creation.bytebuddy.MockAccess
 
setMockName(MockName) - Method in class org.mockito.internal.creation.settings.CreationSettings
 
setMultiline(boolean) - Method in class org.mockito.internal.reporting.PrintSettings
 
Sets - Class in org.mockito.internal.util.collections
 
Sets() - Constructor for class org.mockito.internal.util.collections.Sets
 
setSerializableMode(SerializableMode) - Method in class org.mockito.internal.creation.settings.CreationSettings
 
setStrictness(Strictness) - Method in class org.mockito.internal.framework.DefaultMockitoSession
 
setStrictness(Strictness) - Method in class org.mockito.internal.junit.UniversalTestListener
 
setStrictness(Strictness) - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
setStrictness(Strictness) - Method in interface org.mockito.MockitoSession
Changes the strictness of this MockitoSession.
setTypeToMock(Class<T>) - Method in class org.mockito.internal.creation.settings.CreationSettings
 
setVerificationStrategy(VerificationStrategy) - Method in interface org.mockito.internal.progress.MockingProgress
 
setVerificationStrategy(VerificationStrategy) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
shortThat(ArgumentMatcher<Short>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom short argument matchers.
shortThat(Matcher<Short>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive short arguments.
should() - Method in interface org.mockito.BDDMockito.Then
 
should(VerificationMode) - Method in interface org.mockito.BDDMockito.Then
 
should(InOrder) - Method in interface org.mockito.BDDMockito.Then
 
should(InOrder, VerificationMode) - Method in interface org.mockito.BDDMockito.Then
 
shouldBeReported(Stubbing) - Static method in class org.mockito.internal.stubbing.UnusedStubbingReporting
Decides if the stubbing should be reported as unused.
shouldHaveNoMoreInteractions() - Method in interface org.mockito.BDDMockito.Then
 
shouldHaveZeroInteractions() - Method in interface org.mockito.BDDMockito.Then
 
silent() - Method in class org.mockito.internal.junit.JUnitRule
 
Silent(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner.Silent
 
silent() - Method in interface org.mockito.junit.MockitoRule
Rule will not report stubbing warnings during test execution.
Silent(Class<?>) - Constructor for class org.mockito.runners.MockitoJUnitRunner.Silent
Deprecated.
 
SingleRegisteredInvocation - Class in org.mockito.internal.verification
 
SingleRegisteredInvocation() - Constructor for class org.mockito.internal.verification.SingleRegisteredInvocation
 
size() - Method in class org.mockito.internal.junit.UnusedStubbings
 
size() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
SmartNullPointerException - Exception in org.mockito.exceptions.verification
 
SmartNullPointerException(String) - Constructor for exception org.mockito.exceptions.verification.SmartNullPointerException
 
smartNullPointerException(String, Location) - Static method in class org.mockito.internal.exceptions.Reporter
 
SmartPrinter - Class in org.mockito.internal.reporting
Makes sure both wanted and actual are printed consistently (single line or multiline)
SmartPrinter(MatchableInvocation, Invocation, Integer...) - Constructor for class org.mockito.internal.reporting.SmartPrinter
 
sortSuperTypesLast(Collection<? extends Field>) - Static method in class org.mockito.internal.util.reflection.SuperTypesLastSorter
Return a new collection with the fields sorted first by name, then with any fields moved after their supertypes.
spiedInstance(Object) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
spiedInstance - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
spiedInstance(Object) - Method in interface org.mockito.MockSettings
Specifies the instance to spy on.
spy(T) - Static method in class org.mockito.Mockito
Creates a spy of the real object.
spy(Class<T>) - Static method in class org.mockito.Mockito
Please refer to the documentation of Mockito.spy(Object).
Spy - Annotation Type in org.mockito
Allows shorthand wrapping of field instances in an spy object.
spyAndDelegateAreMutuallyExclusive() - Static method in class org.mockito.internal.exceptions.Reporter
 
SpyAnnotationEngine - Class in org.mockito.internal.configuration
Process fields annotated with @Spy.
SpyAnnotationEngine() - Constructor for class org.mockito.internal.configuration.SpyAnnotationEngine
 
SpyOnInjectedFieldsHandler - Class in org.mockito.internal.configuration.injection
Handler for field annotated with @InjectMocks and @Spy.
SpyOnInjectedFieldsHandler() - Constructor for class org.mockito.internal.configuration.injection.SpyOnInjectedFieldsHandler
 
StackTraceCleaner - Interface in org.mockito.exceptions.stacktrace
Decides if particular StackTraceElement is excluded from the human-readable stack trace output.
StackTraceCleanerProvider - Interface in org.mockito.plugins
An extension point to register custom StackTraceCleaner.
StackTraceFilter - Class in org.mockito.internal.exceptions.stacktrace
 
StackTraceFilter() - Constructor for class org.mockito.internal.exceptions.stacktrace.StackTraceFilter
 
start() - Method in class org.mockito.internal.util.Timer
Starts the timer count down.
startMocking() - Method in class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
startMocking() - Method in interface org.mockito.session.MockitoSessionBuilder
Starts new mocking session! Creates new MockitoSession instance to initialize the session.
startsWith(String) - Static method in class org.mockito.ArgumentMatchers
String argument that starts with the given prefix.
StartsWith - Class in org.mockito.internal.matchers
 
StartsWith(String) - Constructor for class org.mockito.internal.matchers.StartsWith
 
Strict(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner.Strict
 
Strict(Class<?>) - Constructor for class org.mockito.runners.MockitoJUnitRunner.Strict
Deprecated.
 
strictness(Strictness) - Method in class org.mockito.internal.junit.JUnitRule
 
strictness(Strictness) - Method in class org.mockito.internal.session.DefaultMockitoSessionBuilder
 
strictness(Strictness) - Method in interface org.mockito.junit.MockitoRule
The strictness, especially "strict stubs" (Strictness.STRICT_STUBS) helps debugging and keeping tests clean.
Strictness - Enum in org.mockito.quality
Configures the "strictness" of Mockito, affecting the behavior of stubbings and verification.
strictness(Strictness) - Method in interface org.mockito.session.MockitoSessionBuilder
Configures strictness of MockitoSession instance.
StrictnessSelector - Class in org.mockito.internal.stubbing
Helps determining the actual strictness given that it can be configured in multiple ways (at mock, at stubbing, in rule)
StrictnessSelector() - Constructor for class org.mockito.internal.stubbing.StrictnessSelector
 
StrictRunner - Class in org.mockito.internal.runners
 
StrictRunner(InternalRunner, Class<?>) - Constructor for class org.mockito.internal.runners.StrictRunner
 
StrictStubs(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner.StrictStubs
 
StrictStubsRunnerTestListener - Class in org.mockito.internal.junit
Fails early when mismatched arguments used for stubbing
StrictStubsRunnerTestListener() - Constructor for class org.mockito.internal.junit.StrictStubsRunnerTestListener
 
StringUtil - Class in org.mockito.internal.util
 
stripAnnotations - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
stubbedAt() - Method in class org.mockito.internal.invocation.StubInfoImpl
 
stubbedAt() - Method in interface org.mockito.invocation.StubInfo
 
StubbedInvocationMatcher - Class in org.mockito.internal.stubbing
 
StubbedInvocationMatcher(Answer, MatchableInvocation, Strictness) - Constructor for class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
stubber() - Method in class org.mockito.internal.MockitoCore
 
stubber(Strictness) - Method in class org.mockito.internal.MockitoCore
 
Stubber - Interface in org.mockito.stubbing
Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() style
StubberImpl - Class in org.mockito.internal.stubbing
 
StubberImpl(Strictness) - Constructor for class org.mockito.internal.stubbing.StubberImpl
 
Stubbing - Interface in org.mockito.stubbing
Stubbing declared on the mock object.
StubbingComparator - Class in org.mockito.internal.stubbing
Compares stubbings based on InvocationComparator
StubbingComparator() - Constructor for class org.mockito.internal.stubbing.StubbingComparator
 
stubbingCompleted() - Method in interface org.mockito.internal.progress.MockingProgress
 
stubbingCompleted() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
StubbingLookupEvent - Interface in org.mockito.internal.listeners
Represent an information about the looked up stubbing
StubbingLookupListener - Interface in org.mockito.internal.listeners
Listens to attempts to look up stubbing answer for given mocks.
stubbingLookupListeners - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
StubbingLookupNotifier - Class in org.mockito.internal.listeners
 
StubbingLookupNotifier() - Constructor for class org.mockito.internal.listeners.StubbingLookupNotifier
 
stubbingStarted() - Method in interface org.mockito.internal.progress.MockingProgress
 
stubbingStarted() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
stubInfo() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
stubInfo() - Method in interface org.mockito.invocation.Invocation
 
StubInfo - Interface in org.mockito.invocation
The information about stubbing, for example the location of stubbing.
StubInfoImpl - Class in org.mockito.internal.invocation
 
StubInfoImpl(DescribedInvocation) - Constructor for class org.mockito.internal.invocation.StubInfoImpl
 
stubOnly() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
stubOnly - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
stubOnly() - Method in interface org.mockito.MockSettings
A stub-only mock does not record method invocations, thus saving memory but disallowing verification of invocations.
stubPassedToVerify(Object) - Static method in class org.mockito.internal.exceptions.Reporter
 
SubclassByteBuddyMockMaker - Class in org.mockito.internal.creation.bytebuddy
Subclass based mock maker.
SubclassByteBuddyMockMaker() - Constructor for class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
SubclassByteBuddyMockMaker(SubclassLoader) - Constructor for class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
 
SubclassLoader - Interface in org.mockito.internal.creation.bytebuddy
A subclass loader is responsible for resolving a class loading strategy for a mock that is implemented as a subclass.
SuperTypesLastSorter - Class in org.mockito.internal.util.reflection
Sort fields in an order suitable for injection, by name with superclasses moved after their subclasses.
Supplier<T> - Interface in org.mockito.internal.util
Abstract provider that can supply (provide/create) objects of given type.
SuspendMethod - Class in org.mockito.internal.creation
Utilities for Kotlin Continuation-Passing-Style suspending function, detecting and trimming last hidden parameter.
SuspendMethod() - Constructor for class org.mockito.internal.creation.SuspendMethod
 
syntheticField() - Static method in class org.mockito.internal.util.reflection.Fields
Accept fields with non null value.

T

target - Variable in class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
TerminalMockCandidateFilter - Class in org.mockito.internal.configuration.injection.filter
This node returns an actual injecter which will be either : an OngoingInjector that do nothing if a candidate couldn't be found an OngoingInjector that will try to inject the candidate trying first the property setter then if not possible try the field access
TerminalMockCandidateFilter() - Constructor for class org.mockito.internal.configuration.injection.filter.TerminalMockCandidateFilter
 
testFailure(Failure) - Method in class org.mockito.internal.runners.util.FailureDetector
 
testFinished(TestFinishedEvent) - Method in class org.mockito.internal.junit.MismatchReportingTestListener
 
testFinished(TestFinishedEvent) - Method in interface org.mockito.internal.junit.MockitoTestListener
 
testFinished(TestFinishedEvent) - Method in class org.mockito.internal.junit.NoOpTestListener
 
testFinished(TestFinishedEvent) - Method in class org.mockito.internal.junit.StrictStubsRunnerTestListener
 
testFinished(TestFinishedEvent) - Method in class org.mockito.internal.junit.UniversalTestListener
 
TestFinishedEvent - Interface in org.mockito.internal.junit
 
TestMethodsFinder - Class in org.mockito.internal.runners.util
 
then(T) - Static method in class org.mockito.BDDMockito
Bdd style verification of mock behavior.
then(Answer<?>) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
then(Answer<?>) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets a generic Answer for the method.
thenAnswer(Answer<?>) - Method in class org.mockito.internal.stubbing.ConsecutiveStubbing
 
thenAnswer(Answer<?>) - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
thenAnswer(Answer<?>) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets a generic Answer for the method.
thenCallRealMethod() - Method in class org.mockito.internal.stubbing.BaseStubbing
 
thenCallRealMethod() - Method in interface org.mockito.stubbing.OngoingStubbing
Sets the real implementation to be called when the method is called on a mock object.
thenInject() - Method in interface org.mockito.internal.configuration.injection.filter.OngoingInjector
Inject the mock.
thenReturn(T) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
thenReturn(T, T...) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
thenReturn(T) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets a return value to be returned when the method is called.
thenReturn(T, T...) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets consecutive return values to be returned when the method is called.
thenThrow(Throwable...) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
thenThrow(Class<? extends Throwable>) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
thenThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
thenThrow(Throwable...) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets Throwable objects to be thrown when the method is called.
thenThrow(Class<? extends Throwable>) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets a Throwable type to be thrown when the method is called.
thenThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in interface org.mockito.stubbing.OngoingStubbing
Sets Throwable classes to be thrown when the method is called.
thenTry(MockInjectionStrategy) - Method in class org.mockito.internal.configuration.injection.MockInjectionStrategy
Enqueue next injection strategy.
ThreadSafeMockingProgress - Class in org.mockito.internal.progress
Provides access to the MockingProgress of a corresponding Thread.
threwException() - Method in class org.mockito.internal.handler.NotifiedMethodInvocationReport
 
threwException() - Method in interface org.mockito.listeners.MethodInvocationReport
 
ThrowsException - Class in org.mockito.internal.stubbing.answers
An answer that always throws the same throwable.
ThrowsException(Throwable) - Constructor for class org.mockito.internal.stubbing.answers.ThrowsException
Creates a new answer always throwing the given throwable.
timeout(long) - Static method in class org.mockito.Mockito
Verification will be triggered after given amount of millis, allowing testing of async code.
Timeout - Class in org.mockito.verification
See the javadoc for VerificationWithTimeout
Timeout(long, VerificationMode) - Constructor for class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
Timer - Class in org.mockito.internal.util
 
Timer(long) - Constructor for class org.mockito.internal.util.Timer
 
Times - Class in org.mockito.internal.verification
 
Times(int) - Constructor for class org.mockito.internal.verification.Times
 
times(int) - Static method in class org.mockito.internal.verification.VerificationModeFactory
 
times(int) - Method in class org.mockito.internal.verification.VerificationWrapper
 
times(int) - Static method in class org.mockito.Mockito
Allows verifying exact number of invocations.
times(int) - Method in interface org.mockito.verification.VerificationAfterDelay
Verifies that there are exactly N invocations during the given period.
times(int) - Method in interface org.mockito.verification.VerificationWithTimeout
Allows verifying exact number of invocations within given timeout

   verify(mock, timeout(100).times(2)).someMethod("some arg");
 
toAnswer(Answer1<T, A>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a two parameter answer interface
toAnswer(VoidAnswer1<A>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a two parameter answer interface
toAnswer(Answer2<T, A, B>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a two parameter answer interface
toAnswer(VoidAnswer2<A, B>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a two parameter answer interface
toAnswer(Answer3<T, A, B, C>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a three parameter answer interface
toAnswer(VoidAnswer3<A, B, C>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a three parameter answer interface
toAnswer(Answer4<T, A, B, C, D>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a four parameter answer interface
toAnswer(VoidAnswer4<A, B, C, D>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a four parameter answer interface
toAnswer(Answer5<T, A, B, C, D, E>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a five parameter answer interface
toAnswer(VoidAnswer5<A, B, C, D, E>) - Static method in class org.mockito.internal.stubbing.answers.AnswerFunctionalInterfaces
Construct an answer from a five parameter answer interface
toArray() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
toArray(T[]) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
toIterable(Enumeration<T>) - Static method in class org.mockito.internal.util.collections.Iterables
Converts enumeration into iterable
TooLittleActualInvocations - Error in org.mockito.exceptions.verification
 
TooLittleActualInvocations(String) - Constructor for error org.mockito.exceptions.verification.TooLittleActualInvocations
 
tooLittleActualInvocations(Discrepancy, DescribedInvocation, List<Location>) - Static method in class org.mockito.internal.exceptions.Reporter
 
tooLittleActualInvocationsInOrder(Discrepancy, DescribedInvocation, List<Location>) - Static method in class org.mockito.internal.exceptions.Reporter
 
TooManyActualInvocations - Error in org.mockito.exceptions.verification
 
TooManyActualInvocations(String) - Constructor for error org.mockito.exceptions.verification.TooManyActualInvocations
 
tooManyActualInvocations(int, int, DescribedInvocation, List<Location>) - Static method in class org.mockito.internal.exceptions.Reporter
 
tooManyActualInvocationsInOrder(int, int, DescribedInvocation, List<Location>) - Static method in class org.mockito.internal.exceptions.Reporter
 
toString() - Method in error org.mockito.exceptions.verification.ArgumentsAreDifferent
 
toString() - Method in error org.mockito.exceptions.verification.junit.ArgumentsAreDifferent
 
toString() - Method in error org.mockito.exceptions.verification.WantedButNotInvoked
 
toString() - Method in class org.mockito.internal.debugging.LocationImpl
 
toString() - Method in class org.mockito.internal.hamcrest.HamcrestArgumentMatcher
 
toString() - Method in class org.mockito.internal.invocation.InterceptedInvocation
 
toString() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
toString() - Method in class org.mockito.internal.junit.UnusedStubbings
 
toString() - Method in class org.mockito.internal.matchers.And
 
toString() - Method in class org.mockito.internal.matchers.Any
 
toString() - Method in class org.mockito.internal.matchers.apachecommons.ReflectionEquals
 
toString() - Method in class org.mockito.internal.matchers.ArrayEquals
 
toString() - Method in class org.mockito.internal.matchers.CapturingMatcher
 
toString() - Method in class org.mockito.internal.matchers.CompareTo
 
toString() - Method in class org.mockito.internal.matchers.Contains
 
toString() - Method in class org.mockito.internal.matchers.EndsWith
 
toString() - Method in class org.mockito.internal.matchers.Equals
 
toString() - Method in class org.mockito.internal.matchers.EqualsWithDelta
 
toString() - Method in class org.mockito.internal.matchers.Find
 
toString() - Method in class org.mockito.internal.matchers.InstanceOf
 
toString() - Method in class org.mockito.internal.matchers.Matches
 
toString() - Method in class org.mockito.internal.matchers.Not
 
toString() - Method in class org.mockito.internal.matchers.NotNull
 
toString() - Method in class org.mockito.internal.matchers.Null
 
toString() - Method in class org.mockito.internal.matchers.Or
 
toString() - Method in class org.mockito.internal.matchers.Same
 
toString() - Method in class org.mockito.internal.matchers.StartsWith
 
toString() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
toString() - Method in class org.mockito.internal.stubbing.answers.Returns
 
toString() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
toString() - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
toString() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper
 
toString() - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
 
toString() - Method in class org.mockito.internal.util.MockNameImpl
 
toString() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
 
toString() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
toString() - Method in class org.mockito.internal.util.reflection.InstanceField
 
toString() - Method in class org.mockito.internal.verification.AtLeast
 
toString() - Method in class org.mockito.internal.verification.Calls
 
toString() - Method in class org.mockito.internal.verification.Times
 
toString() - Method in interface org.mockito.invocation.DescribedInvocation
Describes the invocation in the human friendly way.
toString() - Method in interface org.mockito.invocation.Location
Human readable location in the source code, see Invocation.getLocation()
toString() - Method in interface org.mockito.mock.MockName
the name
toStringWithType() - Method in interface org.mockito.internal.matchers.ContainsExtraTypeInfo
Returns more verbose description of the object which include type information
toStringWithType() - Method in class org.mockito.internal.matchers.Equals
 
transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) - Method in class org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator
 
TriesToReturnSelf - Class in org.mockito.internal.stubbing.defaultanswers
 
TriesToReturnSelf() - Constructor for class org.mockito.internal.stubbing.defaultanswers.TriesToReturnSelf
 
trimSuspendParameterTypes(Class<?>[]) - Static method in class org.mockito.internal.creation.SuspendMethod
 
tryConstructorInjection() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
tryGetPluginAnnotationEngine() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
tryPropertyOrFieldInjection() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
TypeBasedCandidateFilter - Class in org.mockito.internal.configuration.injection.filter
 
TypeBasedCandidateFilter(MockCandidateFilter) - Constructor for class org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter
 
typeMatches(Object) - Method in interface org.mockito.internal.matchers.ContainsExtraTypeInfo
Checks if target target has matching type.
typeMatches(Object) - Method in class org.mockito.internal.matchers.Equals
 
typeMockabilityOf(Class<?>) - Static method in class org.mockito.internal.util.MockUtil
 
TypeSafeMatching - Class in org.mockito.internal.invocation
 
typeToMock - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
TypeVarBoundedType(TypeVariable<?>) - Constructor for class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
 
typeVariable() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.TypeVarBoundedType
 

U

unfinishedMockingSession() - Static method in class org.mockito.internal.exceptions.Reporter
 
UnfinishedMockingSessionException - Exception in org.mockito.exceptions.misusing
This exception prevents the user from forgetting to use MockitoSession.finishMocking().
UnfinishedMockingSessionException(String) - Constructor for exception org.mockito.exceptions.misusing.UnfinishedMockingSessionException
 
unfinishedStubbing(Location) - Static method in class org.mockito.internal.exceptions.Reporter
 
UnfinishedStubbingException - Exception in org.mockito.exceptions.misusing
 
UnfinishedStubbingException(String) - Constructor for exception org.mockito.exceptions.misusing.UnfinishedStubbingException
 
UnfinishedVerificationException - Exception in org.mockito.exceptions.misusing
 
UnfinishedVerificationException(String) - Constructor for exception org.mockito.exceptions.misusing.UnfinishedVerificationException
 
unfinishedVerificationException(Location) - Static method in class org.mockito.internal.exceptions.Reporter
 
UniversalTestListener - Class in org.mockito.internal.junit
Universal test listener that behaves accordingly to current setting of strictness.
UniversalTestListener(Strictness, MockitoLogger) - Constructor for class org.mockito.internal.junit.UniversalTestListener
 
unncessaryStubbingException(List<Invocation>) - Static method in class org.mockito.internal.exceptions.Reporter
 
UnnecessaryStubbingException - Exception in org.mockito.exceptions.misusing
This exception indicates presence of unused stubbings.
UnnecessaryStubbingException(String) - Constructor for exception org.mockito.exceptions.misusing.UnnecessaryStubbingException
 
UnnecessaryStubbingsReporter - Class in org.mockito.internal.junit
Reports unnecessary stubbings
UnnecessaryStubbingsReporter() - Constructor for class org.mockito.internal.junit.UnnecessaryStubbingsReporter
 
unsupportedCombinationOfAnnotations(String, String) - Static method in class org.mockito.internal.exceptions.Reporter
 
UnusedStubbingReporting - Class in org.mockito.internal.stubbing
Helps determining if stubbing should be reported as unused
UnusedStubbingReporting() - Constructor for class org.mockito.internal.stubbing.UnusedStubbingReporting
 
UnusedStubbings - Class in org.mockito.internal.junit
Contains unused stubbings, knows how to format them
UnusedStubbingsFinder - Class in org.mockito.internal.junit
Finds unused stubbings
UnusedStubbingsFinder() - Constructor for class org.mockito.internal.junit.UnusedStubbingsFinder
 
UnusedStubsFinder - Class in org.mockito.internal.invocation
Deprecated.
UnusedStubsFinder() - Constructor for class org.mockito.internal.invocation.UnusedStubsFinder
Deprecated.
 
useConstructor(Object...) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
useConstructor(Object...) - Method in interface org.mockito.MockSettings
Mockito attempts to use constructor when creating instance of the mock.
usingConstructorWithFancySerializable(SerializableMode) - Static method in class org.mockito.internal.exceptions.Reporter
 

V

ValidableAnswer - Interface in org.mockito.stubbing
Allow to validate this answer is correct for the given invocation.
validate() - Static method in class org.mockito.internal.configuration.GlobalConfiguration
 
validateConstructorUse(boolean, SerializableMode) - Method in class org.mockito.internal.util.MockCreationValidator
 
validateDelegatedInstance(Class<?>, Object) - Method in class org.mockito.internal.util.MockCreationValidator
 
validateExtraInterfaces(Class<?>, Collection<Class<?>>) - Method in class org.mockito.internal.util.MockCreationValidator
 
validateFor(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.AnswersWithDelay
 
validateFor(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.CallsRealMethods
 
validateFor(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.DoesNothing
 
validateFor(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.Returns
 
validateFor(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ReturnsArgumentAt
 
validateFor(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ThrowsException
 
validateFor(InvocationOnMock) - Method in interface org.mockito.stubbing.ValidableAnswer
Validation of the answer at stub time for the given invocation.
validateMockedType(Class<?>, Object) - Method in class org.mockito.internal.util.MockCreationValidator
 
validateMockitoUsage() - Method in class org.mockito.internal.MockitoCore
 
validateMockitoUsage() - Static method in class org.mockito.Mockito
First of all, in case of any trouble, I encourage you to read the Mockito FAQ: https://github.com/mockito/mockito/wiki/FAQ
validateReturnValueFor(InvocationOnMock, Object) - Static method in class org.mockito.internal.stubbing.answers.DefaultAnswerValidator
 
validateState() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
validateState() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
validateState() - Method in interface org.mockito.internal.progress.MockingProgress
 
validateState() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
validateType(Class<?>) - Method in class org.mockito.internal.util.MockCreationValidator
 
validateUnusedStubs(Class<?>, RunNotifier) - Method in class org.mockito.internal.junit.UnnecessaryStubbingsReporter
 
valueOf(String) - Static method in enum org.mockito.Answers
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.mockito.internal.invocation.RealMethod.IsIllegal
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.mockito.internal.util.concurrent.DetachedThreadLocal.Cleaner
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.mockito.internal.util.concurrent.WeakConcurrentSet.Cleaner
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.mockito.mock.SerializableMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.mockito.quality.Strictness
Returns the enum constant of this type with the specified name.
ValuePrinter - Class in org.mockito.internal.matchers.text
Prints a Java object value in a way humans can read it neatly.
values() - Static method in enum org.mockito.Answers
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.mockito.internal.invocation.RealMethod.IsIllegal
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.mockito.internal.util.concurrent.DetachedThreadLocal.Cleaner
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.mockito.internal.util.concurrent.WeakConcurrentSet.Cleaner
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.mockito.mock.SerializableMode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.mockito.quality.Strictness
Returns an array containing the constants of this enum type, in the order they are declared.
VarArgAware(Class<?>) - Constructor for class org.mockito.internal.matchers.InstanceOf.VarArgAware
 
VarArgAware(Class<?>, String) - Constructor for class org.mockito.internal.matchers.InstanceOf.VarArgAware
 
VarargMatcher - Interface in org.mockito.internal.matchers
Internal interface that informs Mockito that the matcher is intended to capture varargs.
verboseLogging() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
verboseLogging() - Method in interface org.mockito.MockSettings
Enables real-time logging of method invocations on this mock.
verboseMatchers(Integer...) - Static method in class org.mockito.internal.reporting.PrintSettings
 
VerboseMockInvocationLogger - Class in org.mockito.internal.debugging
Logs all invocations to standard output.
VerboseMockInvocationLogger() - Constructor for class org.mockito.internal.debugging.VerboseMockInvocationLogger
 
VerboseMockInvocationLogger(PrintStream) - Constructor for class org.mockito.internal.debugging.VerboseMockInvocationLogger
 
VerboseMockitoJUnitRunner - Class in org.mockito.runners
Deprecated.
as of 2.1.0. Use the MockitoJUnitRunner runner instead which contains support for detecting unused stubs.

If you still prefer using this runner, tell us why (create ticket in our issue tracker).

VerboseMockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.runners.VerboseMockitoJUnitRunner
Deprecated.
 
VerifiableInvocationsFinder - Class in org.mockito.internal.invocation.finder
Author: Szczepan Faber, created at: 4/3/11
VerificationAfterDelay - Interface in org.mockito.verification
VerificationAfterDelay is a VerificationMode that allows combining existing verification modes with an initial delay, e.g.
VerificationAwareInvocation - Interface in org.mockito.internal.exceptions
 
VerificationCollector - Interface in org.mockito.junit
Use this rule in order to collect multiple verification failures and report at once.
VerificationCollectorImpl - Class in org.mockito.internal.junit
Mockito implementation of VerificationCollector.
VerificationCollectorImpl() - Constructor for class org.mockito.internal.junit.VerificationCollectorImpl
 
VerificationData - Interface in org.mockito.internal.verification.api
Data needed to perform verification of interactions.
VerificationDataImpl - Class in org.mockito.internal.verification
 
VerificationDataImpl(InvocationContainerImpl, InvocationMatcher) - Constructor for class org.mockito.internal.verification.VerificationDataImpl
 
VerificationDataInOrder - Interface in org.mockito.internal.verification.api
 
VerificationDataInOrderImpl - Class in org.mockito.internal.verification.api
 
VerificationDataInOrderImpl(InOrderContext, List<Invocation>, MatchableInvocation) - Constructor for class org.mockito.internal.verification.api.VerificationDataInOrderImpl
 
VerificationEvent - Interface in org.mockito.verification
Contains all information about a verification that has happened.
VerificationEventImpl - Class in org.mockito.internal.verification
 
VerificationEventImpl(Object, VerificationMode, VerificationData, Throwable) - Constructor for class org.mockito.internal.verification.VerificationEventImpl
 
VerificationInOrderFailure - Error in org.mockito.exceptions.verification
 
VerificationInOrderFailure(String) - Constructor for error org.mockito.exceptions.verification.VerificationInOrderFailure
 
VerificationInOrderMode - Interface in org.mockito.internal.verification.api
 
VerificationListener - Interface in org.mockito.listeners
This listener can be notified of verify invocations on a mock.
verificationListeners() - Method in interface org.mockito.internal.progress.MockingProgress
 
verificationListeners() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
VerificationMode - Interface in org.mockito.verification
Allows verifying that certain behavior happened at least once / exact number of times / never.
VerificationModeFactory - Class in org.mockito.internal.verification
 
VerificationModeFactory() - Constructor for class org.mockito.internal.verification.VerificationModeFactory
 
VerificationOverTimeImpl - Class in org.mockito.internal.verification
Verifies that another verification mode (the delegate) is satisfied within a certain timeframe (before timeoutMillis has passed, measured from the call to verify()), and either returns immediately once it does, or waits until it is definitely satisfied once the full time has passed.
VerificationOverTimeImpl(long, long, VerificationMode, boolean) - Constructor for class org.mockito.internal.verification.VerificationOverTimeImpl
Create this verification mode, to be used to verify invocation ongoing data later.
VerificationOverTimeImpl(long, VerificationMode, boolean, Timer) - Constructor for class org.mockito.internal.verification.VerificationOverTimeImpl
Create this verification mode, to be used to verify invocation ongoing data later.
verificationStarted(VerificationMode) - Method in interface org.mockito.internal.progress.MockingProgress
 
verificationStarted(VerificationMode) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
VerificationStartedEvent - Interface in org.mockito.listeners
The instance of this class is passed to VerificationStartedListener.
VerificationStartedListener - Interface in org.mockito.listeners
This listener gets notified when the user starts verification.
verificationStartedListeners(VerificationStartedListener...) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
verificationStartedListeners - Variable in class org.mockito.internal.creation.settings.CreationSettings
 
verificationStartedListeners(VerificationStartedListener...) - Method in interface org.mockito.MockSettings
Registers a listener(s) that will be notified when user starts verification.
VerificationStartedNotifier - Class in org.mockito.internal.listeners
 
VerificationStartedNotifier() - Constructor for class org.mockito.internal.listeners.VerificationStartedNotifier
 
VerificationStrategy - Interface in org.mockito.verification
Strategy to possibly lazily perform verifications.
VerificationWithTimeout - Interface in org.mockito.verification
VerificationWithTimeout is a VerificationMode that allows combining existing verification modes with 'timeout'.
VerificationWrapper<WrapperType extends VerificationMode> - Class in org.mockito.internal.verification
 
VerificationWrapper(WrapperType) - Constructor for class org.mockito.internal.verification.VerificationWrapper
 
VerificationWrapperInOrderWrapper - Class in org.mockito.internal.verification
 
VerificationWrapperInOrderWrapper(VerificationWrapper<?>, InOrderImpl) - Constructor for class org.mockito.internal.verification.VerificationWrapperInOrderWrapper
 
verify(T) - Method in interface org.mockito.InOrder
Verifies interaction happened once in order.
verify(T, VerificationMode) - Method in interface org.mockito.InOrder
Verifies interaction in order.
verify(T) - Method in class org.mockito.internal.InOrderImpl
 
verify(T, VerificationMode) - Method in class org.mockito.internal.InOrderImpl
 
verify(T, VerificationMode) - Method in class org.mockito.internal.MockitoCore
 
verify(VerificationData) - Method in class org.mockito.internal.verification.AtLeast
 
verify(VerificationData) - Method in class org.mockito.internal.verification.AtMost
 
verify(VerificationData) - Method in class org.mockito.internal.verification.Calls
 
verify(VerificationData) - Method in class org.mockito.internal.verification.Description
Performs verification using the wrapped verification mode implementation.
verify(VerificationData) - Method in class org.mockito.internal.verification.InOrderWrapper
 
verify(VerificationData) - Method in class org.mockito.internal.verification.MockAwareVerificationMode
 
verify(VerificationData) - Method in class org.mockito.internal.verification.NoMoreInteractions
 
verify(VerificationData) - Method in class org.mockito.internal.verification.Only
 
verify(VerificationData) - Method in class org.mockito.internal.verification.Times
 
verify(VerificationData) - Method in class org.mockito.internal.verification.VerificationOverTimeImpl
Verify the given ongoing verification data, and confirm that it satisfies the delegate verification mode before the full duration has passed.
verify(VerificationData) - Method in class org.mockito.internal.verification.VerificationWrapper
 
verify(VerificationData) - Method in class org.mockito.internal.verification.VerificationWrapperInOrderWrapper
 
verify(T) - Static method in class org.mockito.Mockito
Verifies certain behavior happened once.
verify(T, VerificationMode) - Static method in class org.mockito.Mockito
Verifies certain behavior happened at least once / exact number of times / never.
verify(VerificationData) - Method in interface org.mockito.verification.VerificationMode
Performs the verification
verifyInOrder(VerificationDataInOrder) - Method in interface org.mockito.internal.verification.api.VerificationInOrderMode
 
verifyInOrder(VerificationDataInOrder) - Method in class org.mockito.internal.verification.AtLeast
 
verifyInOrder(VerificationDataInOrder) - Method in class org.mockito.internal.verification.Calls
 
verifyInOrder(VerificationDataInOrder) - Method in class org.mockito.internal.verification.NoMoreInteractions
 
verifyInOrder(VerificationDataInOrder) - Method in class org.mockito.internal.verification.Times
 
verifyNoMoreInteractions() - Method in interface org.mockito.InOrder
Verifies that no more interactions happened in order.
verifyNoMoreInteractions() - Method in class org.mockito.internal.InOrderImpl
 
verifyNoMoreInteractions(Object...) - Method in class org.mockito.internal.MockitoCore
 
verifyNoMoreInteractions(Object...) - Static method in class org.mockito.Mockito
Checks if any of given mocks has any unverified interaction.
verifyNoMoreInteractionsInOrder(List<Object>, InOrderContext) - Method in class org.mockito.internal.MockitoCore
 
verifyZeroInteractions(Object...) - Static method in class org.mockito.Mockito
Verifies that no interactions happened on given mocks beyond the previously verified interactions.
This method has the same behavior as Mockito.verifyNoMoreInteractions(Object...).
VoidAnswer1<A0> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a single argument invocation that returns nothing.
VoidAnswer2<A0,A1> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a two argument invocation that returns nothing.
VoidAnswer3<A0,A1,A2> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a three argument invocation that returns nothing.
VoidAnswer4<A0,A1,A2,A3> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a four argument invocation that returns nothing.
VoidAnswer5<A0,A1,A2,A3,A4> - Interface in org.mockito.stubbing
Generic interface to be used for configuring mock's answer for a five argument invocation that returns nothing.

W

wantedAtMostX(int, int) - Static method in class org.mockito.internal.exceptions.Reporter
 
WantedButNotInvoked - Error in org.mockito.exceptions.verification
 
WantedButNotInvoked(String) - Constructor for error org.mockito.exceptions.verification.WantedButNotInvoked
 
wantedButNotInvoked(DescribedInvocation) - Static method in class org.mockito.internal.exceptions.Reporter
 
wantedButNotInvoked(DescribedInvocation, List<? extends DescribedInvocation>) - Static method in class org.mockito.internal.exceptions.Reporter
 
wantedButNotInvokedInOrder(DescribedInvocation, DescribedInvocation) - Static method in class org.mockito.internal.exceptions.Reporter
 
warnForVM(String, String, String, String) - Static method in class org.mockito.internal.util.Platform
 
WarningsCollector - Class in org.mockito.internal.debugging
Deprecated.
WarningsCollector() - Constructor for class org.mockito.internal.debugging.WarningsCollector
Deprecated.
 
WarningsFinder - Class in org.mockito.internal.debugging
 
WarningsFinder(List<Invocation>, List<InvocationMatcher>) - Constructor for class org.mockito.internal.debugging.WarningsFinder
 
WarningsPrinterImpl - Class in org.mockito.internal.debugging
 
WarningsPrinterImpl(List<Invocation>, List<InvocationMatcher>, boolean) - Constructor for class org.mockito.internal.debugging.WarningsPrinterImpl
 
wasUsed() - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
wasUsed() - Method in interface org.mockito.stubbing.Stubbing
Informs if the stubbing was used
WeakConcurrentMap<K,V> - Class in org.mockito.internal.util.concurrent
A thread-safe map with weak keys.
WeakConcurrentMap(boolean) - Constructor for class org.mockito.internal.util.concurrent.WeakConcurrentMap
 
WeakConcurrentMap.WithInlinedExpunction<K,V> - Class in org.mockito.internal.util.concurrent
A WeakConcurrentMap where stale entries are removed as a side effect of interacting with this map.
WeakConcurrentSet<V> - Class in org.mockito.internal.util.concurrent
A thread-safe set with weak values.
WeakConcurrentSet(WeakConcurrentSet.Cleaner) - Constructor for class org.mockito.internal.util.concurrent.WeakConcurrentSet
 
WeakConcurrentSet.Cleaner - Enum in org.mockito.internal.util.concurrent
Determines the cleaning format.
were_exactly_x_interactions(int) - Static method in class org.mockito.internal.reporting.Pluralizer
 
when(T) - Method in class org.mockito.internal.MockitoCore
 
when(T) - Method in class org.mockito.internal.stubbing.DefaultLenientStubber
 
when(T) - Method in class org.mockito.internal.stubbing.StubberImpl
 
when(T) - Static method in class org.mockito.Mockito
Enables stubbing methods.
when(T) - Method in interface org.mockito.stubbing.LenientStubber
Allows declaring the method to stub.
when(T) - Method in interface org.mockito.stubbing.Stubber
Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() style
wildCard() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
WildCardBoundedType(WildcardType) - Constructor for class org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
 
will(Answer<?>) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
will(Answer<?>) - Method in interface org.mockito.BDDMockito.BDDStubber
will(Answer<?>) - Static method in class org.mockito.BDDMockito
willAnswer(Answer<?>) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willAnswer(Answer<?>) - Method in interface org.mockito.BDDMockito.BDDStubber
willAnswer(Answer<?>) - Static method in class org.mockito.BDDMockito
willCallRealMethod() - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willCallRealMethod() - Method in interface org.mockito.BDDMockito.BDDStubber
willCallRealMethod() - Static method in class org.mockito.BDDMockito
willDoNothing() - Method in interface org.mockito.BDDMockito.BDDStubber
willDoNothing() - Static method in class org.mockito.BDDMockito
see original Mockito.doNothing()
willNothing() - Method in interface org.mockito.BDDMockito.BDDStubber
Deprecated.
as of 2.1.0 please use BDDMockito.BDDStubber.willDoNothing() instead
willReturn(T) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willReturn(T, T...) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willReturn(Object) - Method in interface org.mockito.BDDMockito.BDDStubber
willReturn(Object, Object...) - Method in interface org.mockito.BDDMockito.BDDStubber
willReturn(Object) - Static method in class org.mockito.BDDMockito
willReturn(Object, Object...) - Static method in class org.mockito.BDDMockito
willThrow(Throwable...) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willThrow(Class<? extends Throwable>) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
willThrow(Throwable...) - Method in interface org.mockito.BDDMockito.BDDStubber
willThrow(Class<? extends Throwable>) - Method in interface org.mockito.BDDMockito.BDDStubber
willThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in interface org.mockito.BDDMockito.BDDStubber
willThrow(Throwable...) - Static method in class org.mockito.BDDMockito
willThrow(Class<? extends Throwable>) - Static method in class org.mockito.BDDMockito
willThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Static method in class org.mockito.BDDMockito
WithInlinedExpunction() - Constructor for class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
 
withMocks(Set<Object>) - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
withoutAnnotations() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
withoutAnnotations() - Method in interface org.mockito.MockSettings
By default, Mockito makes an attempt to preserve all annotation meta data on the mocked type and its methods to mirror the mocked type as closely as possible.
withSettings() - Static method in class org.mockito.Mockito
Allows mock creation with additional mock settings.
wrappedVerification - Variable in class org.mockito.internal.verification.VerificationWrapper
 
writeText(String, File) - Static method in class org.mockito.internal.util.io.IOUtil
Writes text to file
wrongTypeOfArgumentToReturn(InvocationOnMock, String, Class<?>, int) - Static method in class org.mockito.internal.exceptions.Reporter
 
WrongTypeOfReturnValue - Exception in org.mockito.exceptions.misusing
 
WrongTypeOfReturnValue(String) - Constructor for exception org.mockito.exceptions.misusing.WrongTypeOfReturnValue
 
wrongTypeOfReturnValue(String, String, String) - Static method in class org.mockito.internal.exceptions.Reporter
 
wrongTypeReturnedByDefaultAnswer(Object, String, String, String) - Static method in class org.mockito.internal.exceptions.Reporter
 
A B C D E F G H I J L M N O P R S T U V W 

Copyright © 2023. All rights reserved.