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

A

AbstractMockitoMethodProxy - Class in org.mockito.internal.creation
 
AbstractMockitoMethodProxy() - Constructor for class org.mockito.internal.creation.AbstractMockitoMethodProxy
 
AccessibilityChanger - Class in org.mockito.internal.util.reflection
 
AccessibilityChanger() - Constructor for class org.mockito.internal.util.reflection.AccessibilityChanger
 
add(Object) - Method in class org.mockito.internal.util.IdentitySet
 
add(Invocation) - Method in class org.mockito.internal.verification.RegisteredInvocations
 
addAnswer(Answer) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
addAnswer(Answer, boolean) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
addAnswer(Answer) - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
addAnswerForVoidMethod(Answer) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
addConsecutiveAnswer(Answer) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
AdditionalMatchers - Class in org.mockito
See Matchers for general info about matchers.
AdditionalMatchers() - Constructor for class org.mockito.AdditionalMatchers
 
AllInvocationsFinder - Class in org.mockito.internal.invocation.finder
 
AllInvocationsFinder() - Constructor for class org.mockito.internal.invocation.finder.AllInvocationsFinder
 
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(List<Matcher>) - Constructor for class org.mockito.internal.matchers.And
 
AnnotationEngine - Interface in org.mockito.configuration
Configures mock creation logic behind @Mock, @Captor and @Spy annotations
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.AnswerReturnValuesAdapter
 
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.ThrowsException
 
answer(InvocationOnMock) - Method in class org.mockito.internal.stubbing.answers.ThrowsExceptionClass
 
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.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(InvocationOnMock) - Method in class org.mockito.stubbing.answers.ReturnsElementsOf
 
AnswerReturnValuesAdapter - Class in org.mockito.internal.stubbing.answers
 
AnswerReturnValuesAdapter(ReturnValues) - Constructor for class org.mockito.internal.stubbing.answers.AnswerReturnValuesAdapter
 
Answers - Enum in org.mockito
Enumeration of pre-configured mock answers
Answers - Enum in org.mockito.internal.stubbing.defaultanswers
Deprecated. - please use Answers from top Mockito package: Answers

WARNING Those answers no longer are used by the framework!!! Please use Answers

See Mockito for more information.

AnswersValidator - Class in org.mockito.internal.stubbing.answers
 
AnswersValidator() - Constructor for class org.mockito.internal.stubbing.answers.AnswersValidator
 
Any - Class in org.mockito.internal.matchers
 
ANY - Static variable in class org.mockito.internal.matchers.Any
 
any(Class<T>) - Static method in class org.mockito.Matchers
any kind object, not necessary of the given class.
any() - Static method in class org.mockito.Matchers
any object or null
ANY_VARARG - Static variable in class org.mockito.internal.matchers.AnyVararg
 
anyBoolean() - Static method in class org.mockito.Matchers
any boolean, Boolean or null.
anyByte() - Static method in class org.mockito.Matchers
any byte, Byte or null
anyChar() - Static method in class org.mockito.Matchers
any char, Character or null.
anyCollection() - Static method in class org.mockito.Matchers
any Collection or null.
anyCollectionOf(Class<T>) - Static method in class org.mockito.Matchers
generic friendly alias to Matchers.anyCollection().
anyDouble() - Static method in class org.mockito.Matchers
any double, Double or null.
anyFloat() - Static method in class org.mockito.Matchers
any float, Float or null.
anyInt() - Static method in class org.mockito.Matchers
any int, Integer or null.
anyList() - Static method in class org.mockito.Matchers
any List or null.
anyListOf(Class<T>) - Static method in class org.mockito.Matchers
generic friendly alias to Matchers.anyList().
anyLong() - Static method in class org.mockito.Matchers
any long, Long or null.
anyMap() - Static method in class org.mockito.Matchers
any Map or null.
anyMapOf(Class<K>, Class<V>) - Static method in class org.mockito.Matchers
generic friendly alias to Matchers.anyMap().
anyObject() - Static method in class org.mockito.Matchers
any Object or null.
anySet() - Static method in class org.mockito.Matchers
any Set or null
anySetOf(Class<T>) - Static method in class org.mockito.Matchers
generic friendly alias to Matchers.anySet().
anyShort() - Static method in class org.mockito.Matchers
any short, Short or null.
anyString() - Static method in class org.mockito.Matchers
any String or null.
AnyVararg - Class in org.mockito.internal.matchers
 
AnyVararg() - Constructor for class org.mockito.internal.matchers.AnyVararg
 
anyVararg() - Static method in class org.mockito.Matchers
Any vararg, meaning any number and values of arguments.
appendWarnings(Failure, String) - Method in class org.mockito.internal.util.junit.JUnitFailureHacker
 
apply() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
areEqual(Object, Object) - Static method in class org.mockito.internal.matchers.Equality
 
argThat(Matcher<T>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
ArgumentCaptor<T> - Class in org.mockito
Use it to capture argument values for further assertions.
ArgumentCaptor() - Constructor for class org.mockito.ArgumentCaptor
Deprecated. Please use factory method ArgumentCaptor.forClass(Class) to create captors

This is required to avoid NullPointerExceptions when autoUnboxing primitive types. See issue 99.

Example:

   ArgumentCaptor<Person> argument = ArgumentCaptor.forClass(Person.class);
   verify(mock).doSomething(argument.capture());
   assertEquals("John", argument.getValue().getName());
 
ArgumentMatcher<T> - Class in org.mockito
Allows creating customized argument matchers.
ArgumentMatcher() - Constructor for class org.mockito.ArgumentMatcher
 
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
 
ArgumentMatchingTool() - Constructor for class org.mockito.internal.verification.argumentmatching.ArgumentMatchingTool
 
argumentsAreDifferent(String, String, Location) - Method in class org.mockito.exceptions.Reporter
 
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
 
ArgumentsComparator - Class in org.mockito.internal.invocation
 
ArgumentsComparator() - Constructor for class org.mockito.internal.invocation.ArgumentsComparator
 
argumentsMatch(InvocationMatcher, Invocation) - Method in class org.mockito.internal.invocation.ArgumentsComparator
 
argumentsMatch(InvocationMatcher, Object[]) - Method in class org.mockito.internal.invocation.ArgumentsComparator
 
argumentsToMatchers() - Method in class org.mockito.internal.invocation.Invocation
 
ArrayEquals - Class in org.mockito.internal.matchers
 
ArrayEquals(Object) - Constructor for class org.mockito.internal.matchers.ArrayEquals
 
ArrayUtils - Class in org.mockito.internal.util
 
ArrayUtils() - Constructor for class org.mockito.internal.util.ArrayUtils
 
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.
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) - Static method in class org.mockito.Mockito
Allows at-least-x verification.
atLeast(int) - Method in class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
atLeast(int) - Method in interface org.mockito.verification.VerificationWithTimeout
Allows at-least-x verification withing 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() - Static method in class org.mockito.Mockito
Allows at-least-once verification.
atLeastOnce() - Method in class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
atLeastOnce() - Method in interface org.mockito.verification.VerificationWithTimeout
Allows at-least-once verification withing given timeout.
AtLeastXNumberOfInvocationsChecker - Class in org.mockito.internal.verification.checkers
 
AtLeastXNumberOfInvocationsChecker() - Constructor for class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsChecker
 
AtLeastXNumberOfInvocationsInOrderChecker - Class in org.mockito.internal.verification.checkers
 
AtLeastXNumberOfInvocationsInOrderChecker(InOrderContext) - Constructor for class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsInOrderChecker
 
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) - Static method in class org.mockito.Mockito
Allows at-most-x verification.
atMost(int) - Method in class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
atMost(int) - Method in interface org.mockito.verification.VerificationWithTimeout
Deprecated. Deprecated validation with timeout combined with atMost simply does not make sense... The test would have passed immediately in the concurrent environment

To avoid compilation erros upon upgrade the method is deprecated and it throws a "friendly reminder" exception.

In future release we will remove timeout(x).atMost(y) from the API.

Do you want to find out more? See issue 235

atMostShouldNotBeUsedWithTimeout() - Method in class org.mockito.exceptions.Reporter
 

B

BaseStubbing<T> - Class in org.mockito.internal.stubbing
 
BaseStubbing() - Constructor for class org.mockito.internal.stubbing.BaseStubbing
 
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.BDDOngoingStubbingImpl<T> - Class in org.mockito
 
BDDMockito.BDDOngoingStubbingImpl(OngoingStubbing<T>) - Constructor for class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
BDDMockito.BDDStubber - Interface in org.mockito
See original Stubber
BDDMockito.BDDStubberImpl - Class in org.mockito
 
BDDMockito.BDDStubberImpl(Stubber) - Constructor for class org.mockito.BDDMockito.BDDStubberImpl
 
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(Matcher<Boolean>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
byteThat(Matcher<Byte>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.

C

callRealMethod() - Method in class org.mockito.internal.invocation.Invocation
 
callRealMethod() - Method in interface org.mockito.invocation.InvocationOnMock
calls real method
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
 
canImposterise(Class<?>) - Method in class org.mockito.internal.creation.jmock.ClassImposterizer
 
cannotCallRealMethodOnInterface() - Method in class org.mockito.exceptions.Reporter
 
cannotInitializeForInjectMocksAnnotation(String, Exception) - Method in class org.mockito.exceptions.Reporter
 
cannotInitializeForSpyAnnotation(String, Exception) - Method in class org.mockito.exceptions.Reporter
 
cannotInjectDependency(Field, Object, Exception) - Method in class org.mockito.exceptions.Reporter
 
cannotMockFinalClass(Class<?>) - Method in class org.mockito.exceptions.Reporter
 
cannotStubVoidMethodWithAReturnValue(String) - Method in class org.mockito.exceptions.Reporter
 
cannotStubWithNullThrowable() - Method in class org.mockito.exceptions.Reporter
 
cannotVerifyToString() - Method in class org.mockito.exceptions.Reporter
 
Captor - Annotation Type in org.mockito
Allows shorthand ArgumentCaptor creation on fields.
capture() - Method in class org.mockito.ArgumentCaptor
Use it to capture the argument.
captureArgumentsFrom(Invocation) - Method in interface org.mockito.internal.invocation.CapturesArgumensFromInvocation
 
captureArgumentsFrom(Invocation) - Method in class org.mockito.internal.invocation.InvocationMatcher
 
captureFrom(Object) - Method in interface org.mockito.internal.matchers.CapturesArguments
 
captureFrom(Object) - Method in class org.mockito.internal.matchers.CapturingMatcher
 
captureFrom(Object) - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
CapturesArgumensFromInvocation - Interface in org.mockito.internal.invocation
 
CapturesArguments - Interface in org.mockito.internal.matchers
 
CapturingMatcher<T> - Class in org.mockito.internal.matchers
 
CapturingMatcher() - Constructor for class org.mockito.internal.matchers.CapturingMatcher
 
CGLIBHacker - Class in org.mockito.internal.creation.cglib
 
CGLIBHacker() - Constructor for class org.mockito.internal.creation.cglib.CGLIBHacker
 
CGLIBProxyRealMethod - Class in org.mockito.internal.invocation.realmethod
 
CGLIBProxyRealMethod(MockitoMethodProxy) - Constructor for class org.mockito.internal.invocation.realmethod.CGLIBProxyRealMethod
 
charThat(Matcher<Character>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
check(List<Invocation>, InvocationMatcher, int) - Method in class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsChecker
 
check(List<Invocation>, InvocationMatcher, int) - Method in class org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsInOrderChecker
 
check(List<Invocation>, InvocationMatcher) - Method in class org.mockito.internal.verification.checkers.MissingInvocationChecker
 
check(List<Invocation>, InvocationMatcher, VerificationMode, InOrderContext) - Method in class org.mockito.internal.verification.checkers.MissingInvocationInOrderChecker
 
check(List<Invocation>, InvocationMatcher, int) - Method in class org.mockito.internal.verification.checkers.NumberOfInvocationsChecker
 
check(List<Invocation>, InvocationMatcher, int, InOrderContext) - Method in class org.mockito.internal.verification.checkers.NumberOfInvocationsInOrderChecker
 
checkedExceptionInvalid(Throwable) - Method in class org.mockito.exceptions.Reporter
 
checkItemsNotNull(T, String) - Static method in class org.mockito.internal.util.Checks
 
checkNotNull(T, String) - Static method in class org.mockito.internal.util.Checks
 
Checks - Class in org.mockito.internal.util
Pre-made preconditions
Checks() - Constructor for class org.mockito.internal.util.Checks
 
ClassImposterizer - Class in org.mockito.internal.creation.jmock
Thanks to jMock guys for this handy class that wraps all the cglib magic.
ClassImposterizer.ClassWithSuperclassToWorkAroundCglibBug - Class in org.mockito.internal.creation.jmock
 
ClassImposterizer.ClassWithSuperclassToWorkAroundCglibBug() - Constructor for class org.mockito.internal.creation.jmock.ClassImposterizer.ClassWithSuperclassToWorkAroundCglibBug
 
ClassNameFinder - Class in org.mockito.internal.creation
 
ClassNameFinder() - Constructor for class org.mockito.internal.creation.ClassNameFinder
 
classNameForMock(Object) - Static method in class org.mockito.internal.creation.ClassNameFinder
 
ClassPathLoader - Class in org.mockito.internal.configuration
 
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
 
ClonesArguments - Class in org.mockito.internal.stubbing.answers
 
ClonesArguments() - Constructor for class org.mockito.internal.stubbing.answers.ClonesArguments
 
cmpEq(Comparable<T>) - Static method in class org.mockito.AdditionalMatchers
comparable argument equals to the given value according to their compareTo method.
CollectCreatedMocks - Class in org.mockito.internal.listeners
 
CollectCreatedMocks(List) - Constructor for class org.mockito.internal.listeners.CollectCreatedMocks
 
combineLoadersOf(Class<?>...) - Static method in class org.mockito.internal.creation.jmock.SearchingClassLoader
 
CompareEqual<T extends java.lang.Comparable<T>> - Class in org.mockito.internal.matchers
 
CompareEqual(Comparable<T>) - Constructor for class org.mockito.internal.matchers.CompareEqual
 
CompareTo<T extends java.lang.Comparable<T>> - Class in org.mockito.internal.matchers
 
CompareTo(Comparable<T>) - Constructor for class org.mockito.internal.matchers.CompareTo
 
concat(Class<?>[], Class<?>) - Method in class org.mockito.internal.util.ArrayUtils
 
ConditionalStackTraceFilter - Class in org.mockito.internal.exceptions.base
 
ConditionalStackTraceFilter() - Constructor for class org.mockito.internal.exceptions.base.ConditionalStackTraceFilter
 
ConsecutiveStubbing<T> - Class in org.mockito.internal.stubbing
 
ConsecutiveStubbing(InvocationContainerImpl) - Constructor for class org.mockito.internal.stubbing.ConsecutiveStubbing
 
ConsoleMockitoLogger - Class in org.mockito.internal.util
 
ConsoleMockitoLogger() - Constructor for class org.mockito.internal.util.ConsoleMockitoLogger
 
ConsoleSpammingMockitoJUnitRunner - Class in org.mockito.runners
Uses JUnit 4.5 runner BlockJUnit4ClassRunner.
ConsoleSpammingMockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
 
ConstructorInjection - Class in org.mockito.internal.configuration.injection
Injection strategy based on constructor.
ConstructorInjection() - Constructor for class org.mockito.internal.configuration.injection.ConstructorInjection
 
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.IdentitySet
 
contains(String) - Static method in class org.mockito.Matchers
String argument that contains the given substring.
ContainsExtraTypeInformation - Interface in org.mockito.internal.matchers
 
containsInvocationListener(InvocationListener) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
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
 
create(Class<?>) - Method in class org.mockito.internal.runners.RunnerFactory
 
createArgumentsAreDifferentException(String, String, String) - Static method in class org.mockito.exceptions.verification.junit.JUnitTool
 
createFrom(List<Invocation>) - Static method in class org.mockito.internal.invocation.InvocationMatcher
 
createMock(Class<T>, MockSettingsImpl) - Method in class org.mockito.internal.util.MockUtil
 
createMockFor(Annotation, Field) - Method in interface org.mockito.configuration.AnnotationEngine
Deprecated. Please use AnnotationEngine.process(Class, Object) method instead that is more robust

Creates mock, ArgumentCaptor or wraps field instance in spy object. Only if of correct annotation type.

createMockFor(Annotation, Field) - Method in class org.mockito.internal.configuration.DefaultAnnotationEngine
 
createMockFor(Annotation, Field) - Method in class org.mockito.internal.configuration.InjectingAnnotationEngine
Deprecated. 
createMockFor(Annotation, Field) - Method in class org.mockito.internal.configuration.SpyAnnotationEngine
 
createMockitoMethod(Method) - Method in class org.mockito.internal.creation.MethodInterceptorFilter
 
createMockitoMethodProxy(MethodProxy) - Method in class org.mockito.internal.creation.MethodInterceptorFilter
 
createObjectArray(Object) - Static method in class org.mockito.internal.matchers.ArrayEquals
 

D

decamelizeMatcher(String) - Static method in class org.mockito.internal.util.Decamelizer
 
Decamelizer - Class in org.mockito.internal.util
 
Decamelizer() - Constructor for class org.mockito.internal.util.Decamelizer
 
DefaultAnnotationEngine - Class in org.mockito.internal.configuration
Initializes fields annotated with @Mock or @Captor.
DefaultAnnotationEngine() - Constructor for class org.mockito.internal.configuration.DefaultAnnotationEngine
 
defaultAnswer(Answer) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
defaultAnswer(Answer) - Method in interface org.mockito.MockSettings
Specifies default answers to interactions.
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
 
DefaultMockitoConfiguration - Class in org.mockito.configuration
DefaultConfiguration of Mockito framework
DefaultMockitoConfiguration() - Constructor for class org.mockito.configuration.DefaultMockitoConfiguration
 
DelegatingMethod - Class in org.mockito.internal.creation
 
DelegatingMethod(Method) - Constructor for class org.mockito.internal.creation.DelegatingMethod
 
DelegatingMockitoMethodProxy - Class in org.mockito.internal.creation
 
DelegatingMockitoMethodProxy(MethodProxy) - Constructor for class org.mockito.internal.creation.DelegatingMockitoMethodProxy
 
DeprecatedOngoingStubbing<T> - Interface in org.mockito.stubbing
Stubs a method call with return value or an exception.
describe(Object) - Method in class org.mockito.internal.matchers.Equals
 
describeTo(Description) - Method in class org.mockito.ArgumentMatcher
 
describeTo(Description) - Method in class org.mockito.internal.matchers.And
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Any
 
describeTo(Description) - Method in class org.mockito.internal.matchers.apachecommons.ReflectionEquals
 
describeTo(Description) - Method in class org.mockito.internal.matchers.ArrayEquals
 
describeTo(Description) - Method in class org.mockito.internal.matchers.CapturingMatcher
 
describeTo(Description) - Method in class org.mockito.internal.matchers.CompareTo
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Contains
 
describeTo(Description) - Method in class org.mockito.internal.matchers.EndsWith
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Equals
 
describeTo(Description) - Method in class org.mockito.internal.matchers.EqualsWithDelta
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Find
 
describeTo(Description) - Method in class org.mockito.internal.matchers.InstanceOf
 
describeTo(Description) - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Matches
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Not
 
describeTo(Description) - Method in class org.mockito.internal.matchers.NotNull
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Null
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Or
 
describeTo(Description) - Method in class org.mockito.internal.matchers.Same
 
describeTo(Description) - Method in class org.mockito.internal.matchers.StartsWith
 
Discrepancy - Class in org.mockito.exceptions
 
Discrepancy(int, int) - Constructor for class org.mockito.exceptions.Discrepancy
 
doAnswer(Answer) - Method in class org.mockito.internal.MockitoCore
 
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.Stubber
Use it for stubbing consecutive calls in Mockito.doAnswer(Answer) style:
doCallRealMethod() - Static method in class org.mockito.Mockito
Use doCallRealMethod() when you want to call the real implementation of a method.
DoesNothing - Class in org.mockito.internal.stubbing.answers
 
DoesNothing() - Constructor for class org.mockito.internal.stubbing.answers.DoesNothing
 
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.Stubber
Use it for stubbing consecutive calls in Mockito.doNothing() style:
doReturn(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) - Method in interface org.mockito.stubbing.Stubber
Use it for stubbing consecutive calls in Mockito.doReturn(Object) style.
doThrow(Throwable) - Method in class org.mockito.internal.stubbing.StubberImpl
 
doThrow(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 to throw exception of specified class.
doThrow(Throwable) - Method in interface org.mockito.stubbing.Stubber
Use it for stubbing consecutive calls in Mockito.doThrow(Throwable) style:
doThrow(Class<? extends Throwable>) - Method in interface org.mockito.stubbing.Stubber
Use it for stubbing consecutive calls in Mockito.doThrow(Class) style:
doubleThat(Matcher<Double>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.

E

enableAccess(AccessibleObject) - Method in class org.mockito.internal.util.reflection.AccessibilityChanger
changes the accessibleObject accessibility and returns true if accessibility was changed
EndsWith - Class in org.mockito.internal.matchers
 
EndsWith(String) - Constructor for class org.mockito.internal.matchers.EndsWith
 
endsWith(String) - Static method in class org.mockito.Matchers
String argument that ends with the given suffix.
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.Matchers
boolean argument that is equal to the given value.
eq(byte) - Static method in class org.mockito.Matchers
byte argument that is equal to the given value.
eq(char) - Static method in class org.mockito.Matchers
char argument that is equal to the given value.
eq(double) - Static method in class org.mockito.Matchers
double argument that is equal to the given value.
eq(float) - Static method in class org.mockito.Matchers
float argument that is equal to the given value.
eq(int) - Static method in class org.mockito.Matchers
int argument that is equal to the given value.
eq(long) - Static method in class org.mockito.Matchers
long argument that is equal to the given value.
eq(short) - Static method in class org.mockito.Matchers
short argument that is equal to the given value.
eq(T) - Static method in class org.mockito.Matchers
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.invocation.Invocation
 
equals(Object) - Method in class org.mockito.internal.invocation.SerializableMethod
 
equals(Object) - Method in class org.mockito.internal.listeners.NotifiedMethodInvocationReport
 
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
 
EqualsWithDelta - Class in org.mockito.internal.matchers
 
EqualsWithDelta(Number, Number) - Constructor for class org.mockito.internal.matchers.EqualsWithDelta
 
ExceptionIncludingMockitoWarnings - Exception in org.mockito.internal.exceptions
 
ExceptionIncludingMockitoWarnings(String, Throwable) - Constructor for exception org.mockito.internal.exceptions.ExceptionIncludingMockitoWarnings
 
extraInterfaces(Class<?>...) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
extraInterfaces(Class<?>...) - Method in interface org.mockito.MockSettings
Specifies extra interfaces the mock should implement.
extraInterfacesAcceptsOnlyInterfaces(Class<?>) - Method in class org.mockito.exceptions.Reporter
 
extraInterfacesCannotContainMockedType(Class<?>) - Method in class org.mockito.exceptions.Reporter
 
extraInterfacesDoesNotAcceptNullParameters() - Method in class org.mockito.exceptions.Reporter
 
extraInterfacesRequiresAtLeastOneInterface() - Method in class org.mockito.exceptions.Reporter
 
extraTypeInfoFor(int) - Method in class org.mockito.internal.reporting.PrintSettings
 

F

fieldClass() - Method in class org.mockito.internal.util.reflection.FieldInitializationReport
 
FieldCopier - Class in org.mockito.internal.util.reflection
 
FieldCopier() - Constructor for class org.mockito.internal.util.reflection.FieldCopier
 
fieldInitialisationThrewException(Field, Throwable) - Method in class org.mockito.exceptions.Reporter
 
FieldInitializationReport - Class in org.mockito.internal.util.reflection
 
FieldInitializationReport(Object, 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
 
FieldReader - Class in org.mockito.internal.util.reflection
 
FieldReader(Object, Field) - Constructor for class org.mockito.internal.util.reflection.FieldReader
 
FieldSetter - Class in org.mockito.internal.util.reflection
 
FieldSetter(Object, Field) - Constructor for class org.mockito.internal.util.reflection.FieldSetter
 
fieldWasInitialized() - Method in class org.mockito.internal.util.reflection.FieldInitializationReport
 
filter(Throwable) - Method in class org.mockito.internal.exceptions.base.ConditionalStackTraceFilter
 
filter(StackTraceElement[], boolean) - Method in class org.mockito.internal.exceptions.base.StackTraceFilter
Example how the filter works (+/- means good/bad): [a+, b+, c-, d+, e+, f-, g+] -> [a+, b+, g+] Basically removes all bad from the middle.
filter(Filter) - Method in class org.mockito.internal.runners.JUnit44RunnerImpl
 
filter(Filter) - Method in class org.mockito.internal.runners.JUnit45AndHigherRunnerImpl
 
filter(Collection<T>, ListUtil.Filter<T>) - Static method in class org.mockito.internal.util.ListUtil
 
filter(Filter) - Method in class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
 
filter(Filter) - Method in class org.mockito.runners.MockitoJUnitRunner
 
filter(Filter) - Method in class org.mockito.runners.VerboseMockitoJUnitRunner
 
filterCandidate(Collection<Object>, Field, Object) - Method in class org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter
 
filterCandidate(Collection<Object>, Field, Object) - Method in interface org.mockito.internal.configuration.injection.filter.MockCandidateFilter
 
filterCandidate(Collection<Object>, Field, Object) - Method in class org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter
 
filterCandidate(Collection<Object>, Field, Object) - Method in class org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter
 
FilteredCGLIBProxyRealMethod - Class in org.mockito.internal.invocation.realmethod
 
FilteredCGLIBProxyRealMethod(MockitoMethodProxy) - Constructor for class org.mockito.internal.invocation.realmethod.FilteredCGLIBProxyRealMethod
 
FilteredCGLIBProxyRealMethod(RealMethod) - Constructor for class org.mockito.internal.invocation.realmethod.FilteredCGLIBProxyRealMethod
 
FinalMockCandidateFilter - Class in org.mockito.internal.configuration.injection.filter
This node returns an actual injecter which will be either : an OngoingInjecter that do nothing if a candidate couldn't be found an OngoingInjecter that will try to inject the candidate trying first the property setter then if not possible try the field access
FinalMockCandidateFilter() - Constructor for class org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter
 
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(List<?>) - Method in class org.mockito.internal.invocation.finder.AllInvocationsFinder
gets all invocations from mocks.
find(List<?>) - Method in class org.mockito.internal.invocation.finder.VerifiableInvocationsFinder
 
find(List<?>) - Method in class org.mockito.internal.invocation.UnusedStubsFinder
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>, InvocationMatcher, InOrderContext) - Method in class org.mockito.internal.invocation.InvocationsFinder
 
findAnswerFor(Invocation) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
findClass(String) - Method in class org.mockito.internal.creation.jmock.SearchingClassLoader
 
findFirstUnverified(List<Invocation>) - Method in class org.mockito.internal.invocation.InvocationsFinder
 
findFirstUnverifiedInOrder(InOrderContext, List<Invocation>) - 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>, InvocationMatcher) - Method in class org.mockito.internal.invocation.InvocationsFinder
 
findMatchingChunk(List<Invocation>, InvocationMatcher, int, InOrderContext) - 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) - Method in class org.mockito.internal.invocation.InvocationsFinder
 
findSimilarInvocation(List<Invocation>, InvocationMatcher) - Method in class org.mockito.internal.invocation.InvocationsFinder
 
floatThat(Matcher<Float>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
forClass(Class<T>) - Static method in class org.mockito.ArgumentCaptor
 
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
 
FrameworkUsageValidator - Class in org.mockito.internal.runners.util
 
FrameworkUsageValidator(RunNotifier) - Constructor for class org.mockito.internal.runners.util.FrameworkUsageValidator
 
FriendlyReminderException - Exception in org.mockito.exceptions.misusing
 
FriendlyReminderException(String) - Constructor for exception org.mockito.exceptions.misusing.FriendlyReminderException
 

G

GenericMaster - Class in org.mockito.internal.util.reflection
 
GenericMaster() - Constructor for class org.mockito.internal.util.reflection.GenericMaster
 
geq(Comparable<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
 
get() - Method in enum org.mockito.internal.stubbing.defaultanswers.Answers
Deprecated.  
getActual() - Method in class org.mockito.internal.reporting.SmartPrinter
 
getActualCount() - Method in class org.mockito.exceptions.Discrepancy
 
getActualMatcher() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
getActualMatcher() - Method in interface org.mockito.internal.matchers.MatcherDecorator
 
getAll() - Method in class org.mockito.internal.verification.RegisteredInvocations
 
getAllInvocations() - Method in interface org.mockito.internal.verification.api.VerificationData
 
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
 
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
Configures annotations for mocks
getAnnotationEngine() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
getArgumentMatcherStorage() - Method in interface org.mockito.internal.progress.MockingProgress
 
getArgumentMatcherStorage() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
getArgumentMatcherStorage() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
getArguments() - Method in class org.mockito.internal.invocation.Invocation
 
getArguments() - Method in interface org.mockito.invocation.InvocationOnMock
returns arguments passed to the method
getArgumentsBlock(List<Matcher>, PrintSettings) - Method in class org.mockito.internal.matchers.MatchersPrinter
 
getArgumentsCount() - Method in class org.mockito.internal.invocation.Invocation
 
getArgumentsLine(List<Matcher>, PrintSettings) - Method in class org.mockito.internal.matchers.MatchersPrinter
 
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
 
getDelegate() - Method in class org.mockito.internal.verification.VerificationWithTimeoutImpl
 
getDescription() - Method in class org.mockito.internal.runners.JUnit44RunnerImpl
 
getDescription() - Method in class org.mockito.internal.runners.JUnit45AndHigherRunnerImpl
 
getDescription() - Method in interface org.mockito.internal.runners.RunnerImpl
 
getDescription() - Method in class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
 
getDescription() - Method in class org.mockito.runners.MockitoJUnitRunner
 
getDescription() - Method in class org.mockito.runners.VerboseMockitoJUnitRunner
 
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
 
getGenericType(Field) - Method in class org.mockito.internal.util.reflection.GenericMaster
Finds the generic type (parametrized type) of the field.
getHandler() - Method in class org.mockito.internal.creation.MethodInterceptorFilter
 
getInternalState(Object, String) - Static method in class org.mockito.internal.util.reflection.Whitebox
 
getInvocation() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getInvocation() - Method in class org.mockito.internal.listeners.NotifiedMethodInvocationReport
 
getInvocation() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getInvocationContainer() - Method in class org.mockito.internal.InvocationNotifierHandler
 
getInvocationContainer() - Method in class org.mockito.internal.MockHandler
 
getInvocationContainer() - Method in interface org.mockito.internal.MockHandlerInterface
 
getInvocationListeners() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getInvocations() - Method in interface org.mockito.internal.stubbing.InvocationContainer
 
getInvocations() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
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>) - Method in class org.mockito.internal.invocation.InvocationsFinder
 
getLastValue() - Method in class org.mockito.internal.matchers.CapturingMatcher
 
getLocation() - Method in interface org.mockito.exceptions.PrintableInvocation
 
getLocation() - Method in class org.mockito.internal.debugging.Localized
 
getLocation() - Method in class org.mockito.internal.invocation.Invocation
 
getLocation() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getLocation() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
getLocationOfStubbing() - Method in class org.mockito.internal.listeners.NotifiedMethodInvocationReport
 
getLocationOfStubbing() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getLoggedInfo() - Method in class org.mockito.internal.util.SimpleMockitoLogger
 
getLogger() - Method in class org.mockito.internal.debugging.LoggingListener
 
getMatchers() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getMessage() - Method in error org.mockito.exceptions.verification.junit.ArgumentsAreDifferent
 
getMethod() - Method in class org.mockito.internal.invocation.Invocation
 
getMethod() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
getMethod() - Method in interface org.mockito.invocation.InvocationOnMock
returns the method
getMethodName() - Method in class org.mockito.internal.invocation.Invocation
 
getMethodProxy() - Method in class org.mockito.internal.creation.DelegatingMockitoMethodProxy
 
getMethodProxy() - Method in interface org.mockito.internal.creation.MockitoMethodProxy
 
getMethodProxy() - Method in class org.mockito.internal.creation.SerializableMockitoMethodProxy
 
getMethodProxy() - Method in class org.mockito.internal.invocation.realmethod.CGLIBProxyRealMethod
 
getMethodProxy() - Method in class org.mockito.internal.invocation.realmethod.FilteredCGLIBProxyRealMethod
 
getMethodProxy() - Method in interface org.mockito.internal.invocation.realmethod.HasCGLIBMethodProxy
 
getMock() - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.getMock()
getMock() - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
getMock() - Method in class org.mockito.internal.invocation.Invocation
 
getMock() - Method in class org.mockito.internal.stubbing.ConsecutiveStubbing
 
getMock() - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
getMock() - Method in class org.mockito.internal.verification.MockAwareVerificationMode
 
getMock() - Method in interface org.mockito.invocation.InvocationOnMock
returns the mock object
getMock() - Method in interface org.mockito.stubbing.OngoingStubbing
Returns the mock that was used for this stub.
getMockHandler(T) - Method in class org.mockito.internal.util.MockUtil
 
getMockName() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getMockName(Object) - Method in class org.mockito.internal.util.MockUtil
 
getMockSettings() - Method in class org.mockito.internal.InvocationNotifierHandler
 
getMockSettings() - Method in class org.mockito.internal.MockHandler
 
getMockSettings() - Method in interface org.mockito.internal.MockHandlerInterface
 
getMocksToBeVerifiedInOrder() - Method in class org.mockito.internal.InOrderImpl
 
getName() - Method in class org.mockito.internal.creation.DelegatingMethod
 
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
 
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
 
getPluralizedActualCount() - Method in class org.mockito.exceptions.Discrepancy
 
getPluralizedWantedCount() - Method in class org.mockito.exceptions.Discrepancy
 
getPluralizedWantedCount() - Method in class org.mockito.internal.verification.checkers.AtLeastDiscrepancy
 
getRawArguments() - Method in class org.mockito.internal.invocation.Invocation
 
getRegisteredInvocations() - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
getReturnedValue() - Method in class org.mockito.internal.listeners.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
 
getReturnType() - Method in class org.mockito.internal.stubbing.answers.Returns
 
getReturnValues() - Method in class org.mockito.configuration.DefaultMockitoConfiguration
Deprecated. 
getReturnValues() - Method in interface org.mockito.configuration.IMockitoConfiguration
Deprecated. Please use IMockitoConfiguration.getDefaultAnswer()

Steps:

1. Leave the implementation of getReturnValues() method empty - it's not going to be used anyway.

2. Implement getDefaultAnswer() instead.

In rare cases your code might not compile with recent deprecation & changes. Very sorry for inconvenience but it had to be done in order to keep framework consistent.

See javadoc ReturnValues for info why this method was deprecated

Allows configuring the default return values of unstubbed invocations

See javadoc for IMockitoConfiguration

getReturnValues() - Method in class org.mockito.internal.configuration.GlobalConfiguration
 
getSequenceNumber() - Method in class org.mockito.internal.invocation.Invocation
 
getSpiedInstance() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
getStubbedInvocations() - Method in interface org.mockito.internal.stubbing.InvocationContainer
 
getStubbedInvocations() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
getSuspiciouslyNotMatchingArgsIndexes(List<Matcher>, Object[]) - 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.
getTag() - Method in class org.mockito.internal.creation.cglib.MockitoNamingPolicy
 
getThrowable() - Method in class org.mockito.internal.listeners.NotifiedMethodInvocationReport
 
getThrowable() - Method in class org.mockito.internal.stubbing.answers.ThrowsException
 
getThrowable() - Method in interface org.mockito.listeners.MethodInvocationReport
 
getThrowableClass() - Method in class org.mockito.internal.stubbing.answers.ThrowsExceptionClass
 
getTimeout() - Method in class org.mockito.internal.verification.VerificationWithTimeoutImpl
 
getTreshhold() - Method in class org.mockito.internal.verification.VerificationWithTimeoutImpl
 
getUnfilteredStackTrace() - Method in error org.mockito.exceptions.base.MockitoAssertionError
 
getUnfilteredStackTrace() - Method in exception org.mockito.exceptions.base.MockitoException
 
getUnfilteredStackTrace() - Method in error org.mockito.exceptions.verification.junit.ArgumentsAreDifferent
 
getValue() - Method in class org.mockito.ArgumentCaptor
Returns the captured value of the argument.
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
 
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.exceptions.Discrepancy
 
getWarnings() - Method in class org.mockito.internal.debugging.WarningsCollector
 
given(T) - Method in interface org.mockito.BDDMockito.BDDStubber
See original Stubber.when(Object)
given(T) - Method in class org.mockito.BDDMockito.BDDStubberImpl
 
given(T) - Static method in class org.mockito.BDDMockito
see original Mockito.when(Object)
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 java.lang.Comparable<T>> - Class in org.mockito.internal.matchers
 
GreaterOrEqual(Comparable<T>) - Constructor for class org.mockito.internal.matchers.GreaterOrEqual
 
GreaterThan<T extends java.lang.Comparable<T>> - Class in org.mockito.internal.matchers
 
GreaterThan(Comparable<T>) - Constructor for class org.mockito.internal.matchers.GreaterThan
 
gt(Comparable<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

handle(Invocation) - Method in class org.mockito.internal.InvocationNotifierHandler
 
handle(Invocation) - Method in class org.mockito.internal.MockHandler
 
handle(Invocation) - Method in interface org.mockito.internal.MockitoInvocationHandler
 
handleSpyAnnotation() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
HandyReturnValues - Class in org.mockito.internal.progress
 
HandyReturnValues() - Constructor for class org.mockito.internal.progress.HandyReturnValues
 
hasAnswersForStubbing() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
HasCGLIBMethodProxy - Interface in org.mockito.internal.invocation.realmethod
 
hashCode() - Method in class org.mockito.internal.creation.DelegatingMethod
 
hashCode() - Method in class org.mockito.internal.invocation.Invocation
 
hashCode() - Method in class org.mockito.internal.invocation.SerializableMethod
 
hashCode() - Method in class org.mockito.internal.listeners.NotifiedMethodInvocationReport
 
hashCode() - Method in class org.mockito.internal.matchers.Equals
 
hasInvocationForPotentialStubbing() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
hasInvocationListeners() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
hasJUnit() - Static method in class org.mockito.exceptions.verification.junit.JUnitTool
 
hasSameMethod(Invocation) - Method in class org.mockito.internal.invocation.InvocationMatcher
 
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
hasTestMethods(Class<?>) - Method in class org.mockito.internal.runners.util.TestMethodsFinder
 

I

IdentitySet - Class in org.mockito.internal.util
 
IdentitySet() - Constructor for class org.mockito.internal.util.IdentitySet
 
ignoreForVerification() - Method in class org.mockito.internal.invocation.Invocation
 
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.
imposterise(MethodInterceptor, Class<T>, Class<?>...) - Method in class org.mockito.internal.creation.jmock.ClassImposterizer
 
incorrectUseOfApi() - Method in class org.mockito.exceptions.Reporter
 
initialize() - Method in class org.mockito.internal.util.reflection.FieldInitializer
Initialize field if no initialized and return the actual instance.
initiateMockName(Class) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
initMocks(Object) - Static method in class org.mockito.MockitoAnnotations
Initializes objects annotated with Mockito annotations for given testClass: @Mock, @Spy, @Captor, @InjectMocks
InjectingAnnotationEngine - Class in org.mockito.internal.configuration
See MockitoAnnotations
InjectingAnnotationEngine() - Constructor for class org.mockito.internal.configuration.InjectingAnnotationEngine
 
InjectMocks - Annotation Type in org.mockito
Allows shorthand mock and spy injection. Minimizes repetitive mock and spy injection.
injectMocks(Object) - Method in class org.mockito.internal.configuration.InjectingAnnotationEngine
Initializes mock/spies dependencies for objects annotated with @InjectMocks for given testClass.
injectMocksOnFields(Set<Field>, Set<Object>, Object) - Method in class org.mockito.internal.configuration.DefaultInjectionEngine
 
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<Object>) - Constructor for class org.mockito.internal.InOrderImpl
 
inOrderRequiresFamiliarMock() - Method in class org.mockito.exceptions.Reporter
 
InOrderWrapper - Class in org.mockito.internal.verification
 
InOrderWrapper(VerificationInOrderMode, InOrderImpl) - Constructor for class org.mockito.internal.verification.InOrderWrapper
 
INSTANCE - Static variable in class org.mockito.internal.creation.cglib.MockitoNamingPolicy
 
INSTANCE - Static variable in class org.mockito.internal.creation.jmock.ClassImposterizer
 
InstanceOf - Class in org.mockito.internal.matchers
 
InstanceOf(Class<?>) - Constructor for class org.mockito.internal.matchers.InstanceOf
 
intercept(Object, Method, Object[], MethodProxy) - Method in class org.mockito.internal.creation.MethodInterceptorFilter
 
intThat(Matcher<Integer>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
invalidUseOfMatchers(int, int) - Method in class org.mockito.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 - Class in org.mockito.internal.invocation
Method call on a mock object.
Invocation(Object, MockitoMethod, Object[], int, RealMethod) - Constructor for class org.mockito.internal.invocation.Invocation
 
InvocationContainer - Interface in org.mockito.internal.stubbing
 
InvocationContainerImpl - Class in org.mockito.internal.stubbing
 
InvocationContainerImpl(MockingProgress) - Constructor for class org.mockito.internal.stubbing.InvocationContainerImpl
 
InvocationListener - Interface in org.mockito.listeners
This listener can be notified of method invocations on a mock.
invocationListenerDoesNotAcceptNullParameters() - Method in class org.mockito.exceptions.Reporter
 
invocationListeners(InvocationListener...) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
invocationListeners(InvocationListener...) - Method in interface org.mockito.MockSettings
Registers a listener for method invocations on this mock.
invocationListenersRequiresAtLeastOneListener() - Method in class org.mockito.exceptions.Reporter
 
invocationListenerThrewException(InvocationListener, Throwable) - Method in class org.mockito.exceptions.Reporter
 
InvocationMarker - Class in org.mockito.internal.invocation
 
InvocationMarker() - Constructor for class org.mockito.internal.invocation.InvocationMarker
 
InvocationMatcher - Class in org.mockito.internal.invocation
 
InvocationMatcher(Invocation, List<Matcher>) - Constructor for class org.mockito.internal.invocation.InvocationMatcher
 
InvocationMatcher(Invocation) - Constructor for class org.mockito.internal.invocation.InvocationMatcher
 
InvocationNotifierHandler<T> - Class in org.mockito.internal
Handler, that call all listeners wanted for this mock, before delegating it to the parameterized handler.
InvocationNotifierHandler(MockHandler<T>, MockSettingsImpl) - Constructor for class org.mockito.internal.InvocationNotifierHandler
 
InvocationOnMock - Interface in org.mockito.invocation
An invocation on a mock
InvocationsFinder - Class in org.mockito.internal.invocation
 
InvocationsFinder() - Constructor for class org.mockito.internal.invocation.InvocationsFinder
 
invoke(Object, Object[]) - Method in class org.mockito.internal.invocation.realmethod.CGLIBProxyRealMethod
 
invoke(Object, Object[]) - Method in class org.mockito.internal.invocation.realmethod.FilteredCGLIBProxyRealMethod
 
invoke(Object, Object[]) - Method in interface org.mockito.internal.invocation.realmethod.RealMethod
 
invokedMock() - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
invokeSuper(Object, Object[]) - Method in class org.mockito.internal.creation.AbstractMockitoMethodProxy
 
invokeSuper(Object, Object[]) - Method in interface org.mockito.internal.creation.MockitoMethodProxy
 
IOngoingStubbing - Interface in org.mockito.internal.progress
Marking interface to be removed when DeprecatedOngoingStubbing gets deleted
isA(Class<T>) - Static method in class org.mockito.Matchers
Object argument that implements the given class.
isBad(StackTraceElement) - Method in class org.mockito.internal.exceptions.base.StackTraceFilter
 
isCompareToMethod(Method) - Method in class org.mockito.internal.util.ObjectMethodsGuru
 
isDeclaredOnInterface() - Method in class org.mockito.internal.invocation.Invocation
 
isEmpty() - Method in class org.mockito.internal.verification.RegisteredInvocations
 
isEqualsMethod(Method) - Method in class org.mockito.internal.util.ObjectMethodsGuru
 
isHashCodeMethod(Method) - Method in class org.mockito.internal.util.ObjectMethodsGuru
 
isIgnoredForVerification() - Method in class org.mockito.internal.invocation.Invocation
 
isJUnit45OrHigherAvailable() - Method in class org.mockito.internal.runners.util.RunnerProvider
 
isMock(Object) - Method in class org.mockito.internal.util.MockUtil
 
isMultiline() - Method in class org.mockito.internal.reporting.PrintSettings
 
isNotNull() - Static method in class org.mockito.Matchers
not null argument.
isNotNull(Class<T>) - Static method in class org.mockito.Matchers
not null argument, not necessary of the given class.
isNull() - Method in class org.mockito.internal.util.reflection.FieldReader
 
isNull() - Static method in class org.mockito.Matchers
null argument.
isNull(Class<T>) - Static method in class org.mockito.Matchers
null argument.
isOut(T) - Method in interface org.mockito.internal.util.ListUtil.Filter
 
isPrimitiveWrapper(Class<?>) - Static method in class org.mockito.internal.util.Primitives
 
isSerializable() - Method in class org.mockito.internal.creation.MockSettingsImpl
 
isSurrogate() - Method in class org.mockito.internal.util.MockName
 
isToString() - Method in class org.mockito.internal.invocation.Invocation
 
isToString(Method) - Method in class org.mockito.internal.util.ObjectMethodsGuru
 
isToString(MockitoMethod) - Method in class org.mockito.internal.util.ObjectMethodsGuru
 
isTypeMockable(Class<?>) - Method in class org.mockito.internal.util.MockCreationValidator
 
isValidException(Throwable) - Method in class org.mockito.internal.invocation.Invocation
 
isValidReturnType(Class) - Method in class org.mockito.internal.invocation.Invocation
 
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.Invocation
 
isVerified(Invocation) - Method in interface org.mockito.internal.verification.api.InOrderContext
 
isVerified(Invocation) - Method in class org.mockito.internal.verification.InOrderContextImpl
 
isVoid() - Method in class org.mockito.internal.invocation.Invocation
 
isWarnAboutUnstubbed() - Method in class org.mockito.internal.debugging.LoggingListener
 

J

join(Object...) - Static method in class org.mockito.internal.util.StringJoiner
 
JUnit44RunnerImpl - Class in org.mockito.internal.runners
 
JUnit44RunnerImpl(Class<?>) - Constructor for class org.mockito.internal.runners.JUnit44RunnerImpl
 
JUnit45AndHigherRunnerImpl - Class in org.mockito.internal.runners
 
JUnit45AndHigherRunnerImpl(Class<?>) - Constructor for class org.mockito.internal.runners.JUnit45AndHigherRunnerImpl
 
JUnitFailureHacker - Class in org.mockito.internal.util.junit
 
JUnitFailureHacker() - Constructor for class org.mockito.internal.util.junit.JUnitFailureHacker
 
JUnitTool - Class in org.mockito.exceptions.verification.junit
 
JUnitTool() - Constructor for class org.mockito.exceptions.verification.junit.JUnitTool
 

L

LenientCopyTool - Class in org.mockito.internal.util.reflection
 
LenientCopyTool() - Constructor for class org.mockito.internal.util.reflection.LenientCopyTool
 
leq(Comparable<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 java.lang.Comparable<T>> - Class in org.mockito.internal.matchers
 
LessOrEqual(Comparable<T>) - Constructor for class org.mockito.internal.matchers.LessOrEqual
 
LessThan<T extends java.lang.Comparable<T>> - Class in org.mockito.internal.matchers
 
LessThan(Comparable<T>) - Constructor for class org.mockito.internal.matchers.LessThan
 
ListUtil - Class in org.mockito.internal.util
 
ListUtil() - Constructor for class org.mockito.internal.util.ListUtil
 
ListUtil.Filter<T> - Interface in org.mockito.internal.util
 
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(Matcher) - Constructor for class org.mockito.internal.matchers.LocalizedMatcher
 
Location - Class in org.mockito.internal.debugging
 
Location() - Constructor for class org.mockito.internal.debugging.Location
 
Location(StackTraceFilter) - Constructor for class org.mockito.internal.debugging.Location
 
log(Object) - Method in class org.mockito.internal.util.ConsoleMockitoLogger
 
log(Object) - Method in interface org.mockito.internal.util.MockitoLogger
 
log(Object) - Method in class org.mockito.internal.util.SimpleMockitoLogger
 
LoggingListener - Class in org.mockito.internal.debugging
 
LoggingListener(boolean, MockitoLogger) - Constructor for class org.mockito.internal.debugging.LoggingListener
 
longThat(Matcher<Long>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
lt(Comparable<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.Invocation
 
markStubUsed(PrintableInvocation) - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
markVerified(Invocation) - Method in class org.mockito.internal.InOrderImpl
 
markVerified(List<Invocation>, CapturesArgumensFromInvocation) - Method in class org.mockito.internal.invocation.InvocationMarker
 
markVerified(Invocation, CapturesArgumensFromInvocation) - 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
 
markVerifiedInOrder(List<Invocation>, CapturesArgumensFromInvocation, InOrderContext) - Method in class org.mockito.internal.invocation.InvocationMarker
 
MatcherDecorator - Interface in org.mockito.internal.matchers
 
Matchers - Class in org.mockito
Allow flexible verification or stubbing.
Matchers() - Constructor for class org.mockito.Matchers
 
MatchersBinder - Class in org.mockito.internal.invocation
 
MatchersBinder() - Constructor for class org.mockito.internal.invocation.MatchersBinder
 
MatchersPrinter - Class in org.mockito.internal.matchers
 
MatchersPrinter() - Constructor for class org.mockito.internal.matchers.MatchersPrinter
 
matches(Object) - Method in class org.mockito.ArgumentMatcher
Returns whether this matcher accepts the given argument.
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.AnyVararg
 
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(Object) - Method in class org.mockito.internal.matchers.CompareTo
 
matches(Object) - Method in class org.mockito.internal.matchers.Contains
 
matches(Object) - Method in class org.mockito.internal.matchers.EndsWith
 
matches(Object) - Method in class org.mockito.internal.matchers.Equals
 
matches(Object) - Method in class org.mockito.internal.matchers.EqualsWithDelta
 
matches(Object) - Method in class org.mockito.internal.matchers.Find
 
matches(Object) - Method in class org.mockito.internal.matchers.InstanceOf
 
matches(Object) - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
Matches - Class in org.mockito.internal.matchers
 
Matches(String) - 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(Object) - Method in class org.mockito.internal.matchers.StartsWith
 
matches(String) - Static method in class org.mockito.Matchers
String argument that matches the given regular expression.
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
 
MethodInterceptorFilter - Class in org.mockito.internal.creation
 
MethodInterceptorFilter(MockitoInvocationHandler, MockSettingsImpl) - Constructor for class org.mockito.internal.creation.MethodInterceptorFilter
 
MethodInvocationReport - Interface in org.mockito.listeners
Represent a method call on a mock.
misplacedArgumentMatcher(Location) - Method in class org.mockito.exceptions.Reporter
 
MissingInvocationChecker - Class in org.mockito.internal.verification.checkers
 
MissingInvocationChecker() - Constructor for class org.mockito.internal.verification.checkers.MissingInvocationChecker
 
MissingInvocationInOrderChecker - Class in org.mockito.internal.verification.checkers
 
MissingInvocationInOrderChecker() - Constructor for class org.mockito.internal.verification.checkers.MissingInvocationInOrderChecker
 
missingMethodInvocation() - Method in class org.mockito.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
Allows shorthand mock creation. Minimizes repetitive mock creation code. Makes the test class more readable. Makes the verification error easier to read because the field name is used to identify the 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>, ReturnValues) - Static method in class org.mockito.Mockito
Deprecated. Please use mock(Foo.class, defaultAnswer);

See Mockito.mock(Class, Answer)

Why it is deprecated? ReturnValues is being replaced by Answer for better consistency & interoperability of the framework. Answer interface has been in Mockito for a while and it has the same responsibility as ReturnValues. There's no point in mainting exactly the same interfaces.

Creates mock with a specified strategy for its return values. It's quite advanced feature and typically you don't need it to write decent tests. However it can be helpful when working with legacy systems.

Obviously return values are used only when you don't stub the method call.

   Foo mock = mock(Foo.class, Mockito.RETURNS_SMART_NULLS);
   Foo mockTwo = mock(Foo.class, new YourOwnReturnValues()); 
 

See examples in javadoc for Mockito class

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.
MockAwareVerificationMode - Class in org.mockito.internal.verification
 
MockAwareVerificationMode(Object, VerificationMode) - Constructor for class org.mockito.internal.verification.MockAwareVerificationMode
 
MockCandidateFilter - Interface in org.mockito.internal.configuration.injection.filter
 
MockCreationValidator - Class in org.mockito.internal.util
 
MockCreationValidator() - Constructor for class org.mockito.internal.util.MockCreationValidator
 
mockedTypeIsInconsistentWithSpiedInstanceType(Class<?>, Object) - Method in class org.mockito.exceptions.Reporter
 
MockHandler<T> - Class in org.mockito.internal
Invocation handler set on mock objects.
MockHandler(MockSettingsImpl) - Constructor for class org.mockito.internal.MockHandler
 
MockHandler(MockHandlerInterface<T>) - Constructor for class org.mockito.internal.MockHandler
 
MockHandlerInterface<T> - Interface in org.mockito.internal
 
MockingProgress - Interface in org.mockito.internal.progress
 
MockingProgressImpl - Class in org.mockito.internal.progress
 
MockingProgressImpl() - Constructor for class org.mockito.internal.progress.MockingProgressImpl
 
MockingProgressListener - Interface in org.mockito.internal.listeners
 
mockingStarted(Object, Class, MockSettings) - Method in class org.mockito.internal.listeners.CollectCreatedMocks
 
mockingStarted(Object, Class, MockSettings) - Method in interface org.mockito.internal.listeners.MockingStartedListener
 
mockingStarted(Object, Class, MockSettings) - Method in interface org.mockito.internal.progress.MockingProgress
 
mockingStarted(Object, Class, MockSettings) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
mockingStarted(Object, Class, MockSettings) - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
MockingStartedListener - Interface in org.mockito.internal.listeners
 
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() - Constructor for class org.mockito.Mockito
 
MockitoAnnotations - Class in org.mockito
MockitoAnnotations.initMocks(this); initializes fields annotated with Mockito annotations.
MockitoAnnotations() - Constructor for class org.mockito.MockitoAnnotations
 
MockitoAnnotations.Mock - Annotation Type in org.mockito
Deprecated. 
MockitoAssertionError - Error in org.mockito.exceptions.base
 
MockitoAssertionError(String) - Constructor for error org.mockito.exceptions.base.MockitoAssertionError
 
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
 
MockitoDebuggerImpl - Class in org.mockito.internal.debugging
 
MockitoDebuggerImpl() - Constructor for class org.mockito.internal.debugging.MockitoDebuggerImpl
 
MockitoException - Exception in org.mockito.exceptions.base
 
MockitoException(String, Throwable) - Constructor for exception org.mockito.exceptions.base.MockitoException
 
MockitoException(String) - Constructor for exception org.mockito.exceptions.base.MockitoException
 
MockitoInvocationHandler - Interface in org.mockito.internal
 
MockitoJUnit44Runner - Class in org.mockito.runners
Deprecated. 
MockitoJUnit44Runner(Class<?>) - Constructor for class org.mockito.runners.MockitoJUnit44Runner
Deprecated.  
MockitoJUnitRunner - Class in org.mockito.runners
Compatible with JUnit 4.4 and higher, this runner adds following behavior: Initializes mocks annotated with Mock, so that explicit usage of MockitoAnnotations.initMocks(Object) is not necessary.
MockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.runners.MockitoJUnitRunner
 
MockitoLogger - Interface in org.mockito.internal.util
 
MockitoMethod - Interface in org.mockito.internal.invocation
 
MockitoMethodProxy - Interface in org.mockito.internal.creation
 
MockitoNamingPolicy - Class in org.mockito.internal.creation.cglib
 
MockitoNamingPolicy() - Constructor for class org.mockito.internal.creation.cglib.MockitoNamingPolicy
 
MockName - Class in org.mockito.internal.util
 
MockName(String, Class) - Constructor for class org.mockito.internal.util.MockName
 
MockSettings - Interface in org.mockito
Allows mock creation with additional mock settings.
MockSettingsImpl - Class in org.mockito.internal.creation
 
MockSettingsImpl() - Constructor for class org.mockito.internal.creation.MockSettingsImpl
 
mocksHaveToBePassedToVerifyNoMoreInteractions() - Method in class org.mockito.exceptions.Reporter
 
mocksHaveToBePassedWhenCreatingInOrder() - Method in class org.mockito.exceptions.Reporter
 
MockUtil - Class in org.mockito.internal.util
 
MockUtil(MockCreationValidator) - Constructor for class org.mockito.internal.util.MockUtil
 
MockUtil() - Constructor for class org.mockito.internal.util.MockUtil
 
moreThanOneAnnotationNotAllowed(String) - Method in class org.mockito.exceptions.Reporter
 

N

name(String) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
name(String) - Method in interface org.mockito.MockSettings
Specifies mock name.
NameBasedCandidateFilter - Class in org.mockito.internal.configuration.injection.filter
 
NameBasedCandidateFilter(MockCandidateFilter) - Constructor for class org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter
 
never() - Static method in class org.mockito.Mockito
Alias to times(0), see Mockito.times(int)
never() - Method in class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
never() - Method in interface org.mockito.verification.VerificationWithTimeout
Alias to times(0), see VerificationWithTimeout.times(int)
neverWantedButInvoked(PrintableInvocation, Location) - Method in class org.mockito.exceptions.Reporter
 
NeverWantedButInvoked - Error in org.mockito.exceptions.verification
 
NeverWantedButInvoked(String) - Constructor for error org.mockito.exceptions.verification.NeverWantedButInvoked
 
newInstance(String, Class<?>) - Method in class org.mockito.internal.runners.util.RunnerProvider
 
next() - Static method in class org.mockito.internal.progress.SequenceNumber
 
noArgumentValueWasCaptured() - Method in class org.mockito.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>) - Method in class org.mockito.exceptions.Reporter
 
noMoreInteractionsWantedInOrder(Invocation) - Method in class org.mockito.exceptions.Reporter
 
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(Matcher) - 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) - Method in class org.mockito.exceptions.Reporter
 
notAMockPassedToVerifyNoMoreInteractions() - Method in class org.mockito.exceptions.Reporter
 
notAMockPassedToWhenMethod() - Method in class org.mockito.exceptions.Reporter
 
notAMockPassedWhenCreatingInOrder() - Method in class org.mockito.exceptions.Reporter
 
NotifiedMethodInvocationReport - Class in org.mockito.internal.listeners
Report on a method call
NotifiedMethodInvocationReport(Invocation, Object) - Constructor for class org.mockito.internal.listeners.NotifiedMethodInvocationReport
Build a new MethodInvocationReport with a return value.
NotifiedMethodInvocationReport(Invocation, Throwable) - Constructor for class org.mockito.internal.listeners.NotifiedMethodInvocationReport
Build a new MethodInvocationReport with a return value.
NotNull - Class in org.mockito.internal.matchers
 
notNull() - Static method in class org.mockito.Matchers
not null argument.
notNull(Class<T>) - Static method in class org.mockito.Matchers
not null argument, not necessary of the given class.
Null - Class in org.mockito.internal.matchers
 
NULL - Static variable in class org.mockito.internal.matchers.Null
 
NullInsteadOfMockException - Exception in org.mockito.exceptions.misusing
 
NullInsteadOfMockException(String) - Constructor for exception org.mockito.exceptions.misusing.NullInsteadOfMockException
 
nullPassedToVerify() - Method in class org.mockito.exceptions.Reporter
 
nullPassedToVerifyNoMoreInteractions() - Method in class org.mockito.exceptions.Reporter
 
nullPassedToWhenMethod() - Method in class org.mockito.exceptions.Reporter
 
nullPassedWhenCreatingInOrder() - Method in class org.mockito.exceptions.Reporter
 
NumberOfInvocationsChecker - Class in org.mockito.internal.verification.checkers
 
NumberOfInvocationsChecker() - Constructor for class org.mockito.internal.verification.checkers.NumberOfInvocationsChecker
 
NumberOfInvocationsInOrderChecker - Class in org.mockito.internal.verification.checkers
 
NumberOfInvocationsInOrderChecker() - Constructor for class org.mockito.internal.verification.checkers.NumberOfInvocationsInOrderChecker
 

O

ObjectMethodsGuru - Class in org.mockito.internal.util
 
ObjectMethodsGuru() - Constructor for class org.mockito.internal.util.ObjectMethodsGuru
 
of(String) - Method in class org.mockito.internal.util.RemoveFirstLine
 
on() - Method in class org.mockito.internal.stubbing.VoidMethodStubbableImpl
 
on() - Method in interface org.mockito.stubbing.VoidMethodStubbable
Choose void method for stubbing.
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
OngoingInjecter - 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
 
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() - Static method in class org.mockito.Mockito
Allows checking if given method was the only one invoked.
only() - Method in class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
only() - Method in interface org.mockito.verification.VerificationWithTimeout
Allows checking if given method was the only one invoked.
onlyVoidMethodsCanBeSetToDoNothing() - Method in class org.mockito.exceptions.Reporter
 
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(List<Matcher>) - Constructor for class org.mockito.internal.matchers.Or
 
org.mockito - package org.mockito
Mockito is a mock library for java - see Mockito class for for usage.
org.mockito.configuration - package org.mockito.configuration
Mockito configuration utilities
org.mockito.exceptions - package org.mockito.exceptions
Exception messages, exception hierarchies.
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.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.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
 
org.mockito.internal.configuration.injection.filter - package org.mockito.internal.configuration.injection.filter
 
org.mockito.internal.creation - package org.mockito.internal.creation
Mock object creation.
org.mockito.internal.creation.cglib - package org.mockito.internal.creation.cglib
CGLIB related stuff
org.mockito.internal.creation.jmock - package org.mockito.internal.creation.jmock
Borrowed from jmock codebase
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.base - package org.mockito.internal.exceptions.base
internal implementations of exceptions stuff
org.mockito.internal.exceptions.util - package org.mockito.internal.exceptions.util
 
org.mockito.internal.invocation - package org.mockito.internal.invocation
Invocation and related classes.
org.mockito.internal.invocation.finder - package org.mockito.internal.invocation.finder
 
org.mockito.internal.invocation.realmethod - package org.mockito.internal.invocation.realmethod
implementations of real method calls
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.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.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 ReturnValues
org.mockito.internal.util - package org.mockito.internal.util
Static utils
org.mockito.internal.util.junit - package org.mockito.internal.util.junit
 
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
Publicly visible classes related to invocation
org.mockito.listeners - package org.mockito.listeners
Public classes relative to the call listener.
org.mockito.runners - package org.mockito.runners
JUnit runners.
org.mockito.stubbing - package org.mockito.stubbing
External stubbing related classes
org.mockito.stubbing.answers - package org.mockito.stubbing.answers
 
org.mockito.verification - package org.mockito.verification
 

P

pluralize(int) - Static method in class org.mockito.exceptions.Pluralizer
 
Pluralizer - Class in org.mockito.exceptions
 
Pluralizer() - Constructor for class org.mockito.exceptions.Pluralizer
 
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
 
primitiveValueOrNullFor(Class<T>) - Static method in class org.mockito.internal.util.Primitives
 
primitiveWrapperOf(Class<T>) - Static method in class org.mockito.internal.util.Primitives
 
print(MockitoLogger) - Method in class org.mockito.internal.debugging.WarningsPrinterImpl
 
print() - Method in class org.mockito.internal.debugging.WarningsPrinterImpl
 
print(List<VerificationAwareInvocation>) - Method in class org.mockito.internal.exceptions.util.ScenarioPrinter
 
PrintableInvocation - Interface in org.mockito.exceptions
 
PrintingFriendlyInvocation - Interface in org.mockito.internal.reporting
 
printInvocations(Object...) - Method in class org.mockito.internal.debugging.MockitoDebuggerImpl
 
printInvocations(Object...) - Method in interface org.mockito.MockitoDebugger
 
printMethodReturnType() - Method in class org.mockito.internal.invocation.Invocation
 
printReturnType() - Method in class org.mockito.internal.stubbing.answers.Returns
 
PrintSettings - Class in org.mockito.internal.reporting
 
PrintSettings() - Constructor for class org.mockito.internal.reporting.PrintSettings
 
process(Class<?>, Object) - Method in interface org.mockito.configuration.AnnotationEngine
Allows extending the interface to perform action on specific fields on the test class.
process(Class<?>, Object) - Method in class org.mockito.internal.configuration.DefaultAnnotationEngine
 
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(Class<?>, Object) - Method in class org.mockito.internal.configuration.SpyAnnotationEngine
 
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
 
pullMatchers() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
pullMatchers() - 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
 
pullOngoingStubbing() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
pullVerificationMode() - Method in interface org.mockito.internal.progress.MockingProgress
 
pullVerificationMode() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
pullVerificationMode() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 

R

read() - Method in class org.mockito.internal.util.reflection.FieldReader
 
RealMethod - Interface in org.mockito.internal.invocation.realmethod
 
refEq(T, String...) - Static method in class org.mockito.Matchers
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
 
RegisteredInvocations - Class in org.mockito.internal.verification
 
RegisteredInvocations() - Constructor for class org.mockito.internal.verification.RegisteredInvocations
 
RemoveFirstLine - Class in org.mockito.internal.util
 
RemoveFirstLine() - Constructor for class org.mockito.internal.util.RemoveFirstLine
 
removeLast() - Method in class org.mockito.internal.verification.RegisteredInvocations
 
reportAnd() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportAnd() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
Reporter - Class in org.mockito.exceptions
Reports verification and misusing errors.
Reporter() - Constructor for class org.mockito.exceptions.Reporter
 
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(Matcher) - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportMatcher(Matcher) - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
reportNot() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
 
reportNot() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
 
reportOngoingStubbing(IOngoingStubbing) - Method in interface org.mockito.internal.progress.MockingProgress
 
reportOngoingStubbing(IOngoingStubbing) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
reportOngoingStubbing(IOngoingStubbing) - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
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() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
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(InvocationMatcher) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
resetMock(T) - Method in class org.mockito.internal.util.MockUtil
 
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
 
resetOngoingStubbing() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
resolveTypeInstances(Class<?>...) - Method in interface org.mockito.internal.util.reflection.FieldInitializer.ConstructorArgumentResolver
Try to resolve instances from types.
returnChar() - Method in class org.mockito.internal.progress.HandyReturnValues
 
returnFalse() - Method in class org.mockito.internal.progress.HandyReturnValues
 
returnFor(Class<T>) - Method in class org.mockito.internal.progress.HandyReturnValues
 
returnFor(T) - Method in class org.mockito.internal.progress.HandyReturnValues
 
returnList() - Method in class org.mockito.internal.progress.HandyReturnValues
 
returnMap() - Method in class org.mockito.internal.progress.HandyReturnValues
 
returnNull() - Method in class org.mockito.internal.progress.HandyReturnValues
 
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_SMART_NULLS - Static variable in class org.mockito.Mockito
Optional Answer to be used with Mockito.mock(Class, Answer)
ReturnsDeepStubs - Class in org.mockito.internal.stubbing.defaultanswers
 
ReturnsDeepStubs() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs
 
ReturnsElementsOf - Class in org.mockito.stubbing.answers
Returns elements of the collection.
ReturnsElementsOf(Collection) - Constructor for class org.mockito.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
 
returnSet() - Method in class org.mockito.internal.progress.HandyReturnValues
 
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 2.0 mock.
ReturnsMoreEmptyValues() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsMoreEmptyValues
 
returnsNull() - Method in class org.mockito.internal.stubbing.answers.Returns
 
returnsPrimitive() - Method in class org.mockito.internal.invocation.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
 
returnString() - Method in class org.mockito.internal.progress.HandyReturnValues
 
ReturnValues - Interface in org.mockito
Deprecated. Instead, please use Answer interface

In rare cases your code might not compile with recent deprecation & changes. Very sorry for inconvenience but it had to be done in order to keep framework consistent.

Why it is deprecated? ReturnValues is being replaced by Answer for better consistency & interoperability of the framework. Answer interface has been in Mockito for a while and it has the same responsibility as ReturnValues. There's no point in mainting exactly the same interfaces.

Configures return values for an unstubbed invocation

Can be used in Mockito.mock(Class, ReturnValues)

returnZero() - Method in class org.mockito.internal.progress.HandyReturnValues
 
run(RunNotifier) - Method in class org.mockito.internal.runners.JUnit44RunnerImpl
 
run(RunNotifier) - Method in class org.mockito.internal.runners.JUnit45AndHigherRunnerImpl
 
run(RunNotifier) - Method in interface org.mockito.internal.runners.RunnerImpl
 
run(RunNotifier) - Method in class org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
 
run(RunNotifier) - Method in class org.mockito.runners.MockitoJUnitRunner
 
run(RunNotifier) - Method in class org.mockito.runners.VerboseMockitoJUnitRunner
 
RunnerFactory - Class in org.mockito.internal.runners
 
RunnerFactory() - Constructor for class org.mockito.internal.runners.RunnerFactory
 
RunnerImpl - Interface in org.mockito.internal.runners
I'm using this surrogate interface to hide internal Runner implementations.
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 - Class in org.mockito.internal.matchers
 
Same(Object) - Constructor for class org.mockito.internal.matchers.Same
 
same(T) - Static method in class org.mockito.Matchers
Object argument that is the same as the given value.
ScenarioPrinter - Class in org.mockito.internal.exceptions.util
 
ScenarioPrinter() - Constructor for class org.mockito.internal.exceptions.util.ScenarioPrinter
 
SearchingClassLoader - Class in org.mockito.internal.creation.jmock
Thanks to jMock guys for this ClassLoader.
SearchingClassLoader(ClassLoader, ClassLoader) - Constructor for class org.mockito.internal.creation.jmock.SearchingClassLoader
 
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() - Method in interface org.mockito.MockSettings
Configures the mock to be serializable.
SERIALIZABLE_INSTANCE - Static variable in class org.mockito.internal.creation.jmock.SerializableNoOp
 
SerializableMethod - Class in org.mockito.internal.invocation
 
SerializableMethod(Method) - Constructor for class org.mockito.internal.invocation.SerializableMethod
 
SerializableMockitoMethodProxy - Class in org.mockito.internal.creation
 
SerializableMockitoMethodProxy(MethodProxy) - Constructor for class org.mockito.internal.creation.SerializableMockitoMethodProxy
 
SerializableNoOp - Class in org.mockito.internal.creation.jmock
 
SerializableNoOp() - Constructor for class org.mockito.internal.creation.jmock.SerializableNoOp
 
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.FieldSetter
 
setAnswersForStubbing(List<Answer>) - Method in class org.mockito.internal.InvocationNotifierHandler
 
setAnswersForStubbing(List<Answer>) - Method in class org.mockito.internal.MockHandler
 
setAnswersForStubbing(List<Answer>) - Method in interface org.mockito.internal.MockHandlerInterface
 
setAnswersForStubbing(List<Answer>) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
setInternalState(Object, String, Object) - Static method in class org.mockito.internal.util.reflection.Whitebox
 
setInvocationForPotentialStubbing(InvocationMatcher) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
setListener(MockingProgressListener) - Method in interface org.mockito.internal.progress.MockingProgress
 
setListener(MockingProgressListener) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
setListener(MockingProgressListener) - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
setMatchersToBeDescribedWithExtraTypeInfo(Integer[]) - Method in class org.mockito.internal.reporting.PrintSettings
 
setMethodForStubbing(InvocationMatcher) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
 
setMockitoNamingPolicy(MockitoMethodProxy) - Method in class org.mockito.internal.creation.cglib.CGLIBHacker
 
setMultiline(boolean) - Method in class org.mockito.internal.reporting.PrintSettings
 
shortThat(Matcher<Short>) - Static method in class org.mockito.Matchers
Allows creating custom argument matchers.
SimpleMockitoLogger - Class in org.mockito.internal.util
 
SimpleMockitoLogger() - Constructor for class org.mockito.internal.util.SimpleMockitoLogger
 
smartNullPointerException(String, Location) - Method in class org.mockito.exceptions.Reporter
 
SmartNullPointerException - Exception in org.mockito.exceptions.verification
 
SmartNullPointerException(String) - Constructor for exception org.mockito.exceptions.verification.SmartNullPointerException
 
SmartPrinter - Class in org.mockito.internal.reporting
Makes sure both wanted and actual are printed consistently (single line or multiline)
SmartPrinter(PrintingFriendlyInvocation, PrintingFriendlyInvocation, Integer...) - Constructor for class org.mockito.internal.reporting.SmartPrinter
 
spiedInstance(Object) - Method in class org.mockito.internal.creation.MockSettingsImpl
 
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 - Annotation Type in org.mockito
Allows shorthand wrapping of field instances in an spy object.
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
 
StackTraceFilter - Class in org.mockito.internal.exceptions.base
 
StackTraceFilter() - Constructor for class org.mockito.internal.exceptions.base.StackTraceFilter
 
StartsWith - Class in org.mockito.internal.matchers
 
StartsWith(String) - Constructor for class org.mockito.internal.matchers.StartsWith
 
startsWith(String) - Static method in class org.mockito.Matchers
String argument that starts with the given prefix.
StringJoiner - Class in org.mockito.internal.util
 
StringJoiner() - Constructor for class org.mockito.internal.util.StringJoiner
 
stub() - Method in class org.mockito.internal.MockitoCore
 
stub(T) - Method in class org.mockito.internal.MockitoCore
 
stub(T) - Static method in class org.mockito.Mockito
Stubs a method call with return value or an exception.
stubbedAt() - Method in class org.mockito.internal.invocation.StubInfo
 
StubbedInvocationMatcher - Class in org.mockito.internal.stubbing
 
StubbedInvocationMatcher(InvocationMatcher, Answer) - Constructor for class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
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() - Constructor for class org.mockito.internal.stubbing.StubberImpl
 
stubbingCompleted(Invocation) - Method in interface org.mockito.internal.progress.MockingProgress
 
stubbingCompleted(Invocation) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
stubbingCompleted(Invocation) - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
stubbingStarted() - Method in interface org.mockito.internal.progress.MockingProgress
 
stubbingStarted() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
stubbingStarted() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
stubInfo() - Method in class org.mockito.internal.invocation.Invocation
 
StubInfo - Class in org.mockito.internal.invocation
 
StubInfo(PrintableInvocation) - Constructor for class org.mockito.internal.invocation.StubInfo
 
stubVoid(T) - Method in class org.mockito.internal.MockitoCore
 
stubVoid(T) - Static method in class org.mockito.Mockito
Deprecated. Use Mockito.doThrow(Throwable) method for stubbing voids

T

testFinished(Description) - Method in class org.mockito.internal.runners.util.FrameworkUsageValidator
 
TestMethodsFinder - Class in org.mockito.internal.runners.util
 
TestMethodsFinder() - Constructor for class org.mockito.internal.runners.util.TestMethodsFinder
 
then(Answer<?>) - Method in class org.mockito.internal.stubbing.ConsecutiveStubbing
 
then(Answer<?>) - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
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.OngoingInjecter
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(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 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
 
ThreadSafeMockingProgress() - Constructor for class org.mockito.internal.progress.ThreadSafeMockingProgress
 
threwException() - Method in class org.mockito.internal.listeners.NotifiedMethodInvocationReport
 
threwException() - Method in interface org.mockito.listeners.MethodInvocationReport
 
ThrowsException - Class in org.mockito.internal.stubbing.answers
 
ThrowsException(Throwable) - Constructor for class org.mockito.internal.stubbing.answers.ThrowsException
 
ThrowsExceptionClass - Class in org.mockito.internal.stubbing.answers
 
ThrowsExceptionClass(Class<? extends Throwable>) - Constructor for class org.mockito.internal.stubbing.answers.ThrowsExceptionClass
 
timeout(int) - Static method in class org.mockito.Mockito
Allows verifying with timeout.
Timeout - Class in org.mockito.verification
See the javadoc for VerificationWithTimeout
Timeout(int, VerificationMode) - Constructor for class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
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) - Static method in class org.mockito.Mockito
Allows verifying exact number of invocations.
times(int) - Method in class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
times(int) - Method in interface org.mockito.verification.VerificationWithTimeout
Allows verifying exact number of invocations within given timeout
toAnswer(Answer<?>) - Method in class org.mockito.internal.stubbing.ConsecutiveStubbing
 
toAnswer(Answer<?>) - Method in class org.mockito.internal.stubbing.OngoingStubbingImpl
 
toAnswer(Answer<?>) - Method in class org.mockito.internal.stubbing.VoidMethodStubbableImpl
 
toAnswer(Answer<?>) - Method in interface org.mockito.stubbing.DeprecatedOngoingStubbing
Set a generic Answer for the stubbed method.
toAnswer(Answer<?>) - Method in interface org.mockito.stubbing.VoidMethodStubbable
Stubs a void method with generic Answer
tooLittleActualInvocations(Discrepancy, PrintableInvocation, Location) - Method in class org.mockito.exceptions.Reporter
 
TooLittleActualInvocations - Error in org.mockito.exceptions.verification
 
TooLittleActualInvocations(String) - Constructor for error org.mockito.exceptions.verification.TooLittleActualInvocations
 
tooLittleActualInvocationsInOrder(Discrepancy, PrintableInvocation, Location) - Method in class org.mockito.exceptions.Reporter
 
tooManyActualInvocations(int, int, PrintableInvocation, Location) - Method in class org.mockito.exceptions.Reporter
 
TooManyActualInvocations - Error in org.mockito.exceptions.verification
 
TooManyActualInvocations(String) - Constructor for error org.mockito.exceptions.verification.TooManyActualInvocations
 
tooManyActualInvocationsInOrder(int, int, PrintableInvocation, Location) - Method in class org.mockito.exceptions.Reporter
 
toReturn(T) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
toReturn() - Method in class org.mockito.internal.stubbing.VoidMethodStubbableImpl
 
toReturn(T) - Method in interface org.mockito.stubbing.DeprecatedOngoingStubbing
Set a return value for the stubbed method.
toReturn() - Method in interface org.mockito.stubbing.VoidMethodStubbable
Stubs void method to 'just return' (e.g.
toString() - Method in interface org.mockito.exceptions.PrintableInvocation
 
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.Location
 
toString() - Method in class org.mockito.internal.invocation.Invocation
 
toString(List<Matcher>, PrintSettings) - Method in class org.mockito.internal.invocation.Invocation
 
toString(PrintSettings) - Method in class org.mockito.internal.invocation.Invocation
 
toString() - Method in class org.mockito.internal.invocation.InvocationMatcher
 
toString(PrintSettings) - Method in class org.mockito.internal.invocation.InvocationMatcher
 
toString() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
toString() - Method in class org.mockito.internal.progress.MockingProgressImpl
 
toString() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
toString(PrintSettings) - Method in interface org.mockito.internal.reporting.PrintingFriendlyInvocation
 
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.MockName
 
toString() - Method in class org.mockito.internal.verification.AtLeast
 
toString() - Method in class org.mockito.internal.verification.Times
 
toThrow(Throwable) - Method in class org.mockito.internal.stubbing.BaseStubbing
 
toThrow(Throwable) - Method in class org.mockito.internal.stubbing.VoidMethodStubbableImpl
 
toThrow(Throwable) - Method in interface org.mockito.stubbing.DeprecatedOngoingStubbing
Set a Throwable to be thrown when the stubbed method is called.
toThrow(Throwable) - Method in interface org.mockito.stubbing.VoidMethodStubbable
Stubs void method with an exception.
tryConstructorInjection() - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
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.ContainsExtraTypeInformation
 
typeMatches(Object) - Method in class org.mockito.internal.matchers.Equals
 
typeMatches(Object) - Method in class org.mockito.internal.matchers.LocalizedMatcher
 

U

unfinishedStubbing(Location) - Method in class org.mockito.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) - Method in class org.mockito.exceptions.Reporter
 
unsupportedCombinationOfAnnotations(String, String) - Method in class org.mockito.exceptions.Reporter
 
UnusedStubsFinder - Class in org.mockito.internal.invocation
 
UnusedStubsFinder() - Constructor for class org.mockito.internal.invocation.UnusedStubsFinder
 

V

validate() - Static method in class org.mockito.internal.configuration.GlobalConfiguration
 
validate(Answer<?>, Invocation) - Method in class org.mockito.internal.stubbing.answers.AnswersValidator
 
validateExtraInterfaces(Class, Class...) - Method in class org.mockito.internal.util.MockCreationValidator
 
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: http://code.google.com/p/mockito/wiki/FAQ
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
 
validateState() - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
validateType(Class) - Method in class org.mockito.internal.util.MockCreationValidator
 
valueFor(InvocationOnMock) - Method in interface org.mockito.ReturnValues
Deprecated. return value for an unstubbed invocation
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.stubbing.defaultanswers.Answers
Deprecated. Returns the enum constant of this type with the specified name.
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.stubbing.defaultanswers.Answers
Deprecated. Returns an array containing the constants of this enum type, in the order they are declared.
VarargMatcher - Interface in org.mockito.internal.matchers
 
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
Experimental implementation that suppose to improve tdd/testing experience.
VerboseMockitoJUnitRunner(Class<?>) - Constructor for class org.mockito.runners.VerboseMockitoJUnitRunner
 
VerifiableInvocationsFinder - Class in org.mockito.internal.invocation.finder
Author: Szczepan Faber, created at: 4/3/11
VerifiableInvocationsFinder() - Constructor for class org.mockito.internal.invocation.finder.VerifiableInvocationsFinder
 
VerificationAwareInvocation - Interface in org.mockito.internal.exceptions
 
VerificationData - Interface in org.mockito.internal.verification.api
 
VerificationDataImpl - Class in org.mockito.internal.verification
 
VerificationDataImpl(InvocationContainer, 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>, InvocationMatcher) - Constructor for class org.mockito.internal.verification.api.VerificationDataInOrderImpl
 
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
 
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
 
verificationStarted(VerificationMode) - Method in interface org.mockito.internal.progress.MockingProgress
 
verificationStarted(VerificationMode) - Method in class org.mockito.internal.progress.MockingProgressImpl
 
verificationStarted(VerificationMode) - Method in class org.mockito.internal.progress.ThreadSafeMockingProgress
 
VerificationWithTimeout - Interface in org.mockito.verification
VerificationWithTimeout is a VerificationMode that allows combining existing verification modes with 'timeout'.
VerificationWithTimeoutImpl - Class in org.mockito.internal.verification
 
VerificationWithTimeoutImpl(int, int, VerificationMode) - Constructor for class org.mockito.internal.verification.VerificationWithTimeoutImpl
 
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.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.VerificationWithTimeoutImpl
 
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 class org.mockito.verification.Timeout
See the javadoc for VerificationWithTimeout
verify(VerificationData) - Method in interface org.mockito.verification.VerificationMode
 
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.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.
voidMethodStubbable(T) - Method in class org.mockito.internal.InvocationNotifierHandler
 
voidMethodStubbable(T) - Method in class org.mockito.internal.MockHandler
 
voidMethodStubbable(T) - Method in interface org.mockito.internal.MockHandlerInterface
 
VoidMethodStubbable<T> - Interface in org.mockito.stubbing
Stubs void method with an exception.
VoidMethodStubbableImpl<T> - Class in org.mockito.internal.stubbing
 
VoidMethodStubbableImpl(T, InvocationContainerImpl) - Constructor for class org.mockito.internal.stubbing.VoidMethodStubbableImpl
 

W

wantedAtMostX(int, int) - Method in class org.mockito.exceptions.Reporter
 
wantedButNotInvoked(PrintableInvocation) - Method in class org.mockito.exceptions.Reporter
 
wantedButNotInvoked(PrintableInvocation, List<? extends PrintableInvocation>) - Method in class org.mockito.exceptions.Reporter
 
WantedButNotInvoked - Error in org.mockito.exceptions.verification
 
WantedButNotInvoked(String) - Constructor for error org.mockito.exceptions.verification.WantedButNotInvoked
 
wantedButNotInvokedInOrder(PrintableInvocation, PrintableInvocation) - Method in class org.mockito.exceptions.Reporter
 
WarningsCollector - Class in org.mockito.internal.debugging
 
WarningsCollector() - Constructor for class org.mockito.internal.debugging.WarningsCollector
 
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>) - Constructor for class org.mockito.internal.debugging.WarningsPrinterImpl
 
WarningsPrinterImpl(List<Invocation>, List<InvocationMatcher>, boolean) - Constructor for class org.mockito.internal.debugging.WarningsPrinterImpl
 
wasUsed() - Method in class org.mockito.internal.stubbing.StubbedInvocationMatcher
 
when(T) - Method in class org.mockito.internal.MockitoCore
 
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.Stubber
Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() style
Whitebox - Class in org.mockito.internal.util.reflection
 
Whitebox() - Constructor for class org.mockito.internal.util.reflection.Whitebox
 
will(Answer<?>) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.then(Answer)
will(Answer<?>) - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willAnswer(Answer<?>) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.thenAnswer(Answer)
willAnswer(Answer<?>) - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willAnswer(Answer) - Method in interface org.mockito.BDDMockito.BDDStubber
See original Stubber.doAnswer(Answer)
willAnswer(Answer) - Method in class org.mockito.BDDMockito.BDDStubberImpl
 
willAnswer(Answer) - Static method in class org.mockito.BDDMockito
see original Mockito.doAnswer(Answer)
willCallRealMethod() - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.thenCallRealMethod()
willCallRealMethod() - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willCallRealMethod() - Static method in class org.mockito.BDDMockito
see original Mockito.doCallRealMethod()
willDoNothing() - Static method in class org.mockito.BDDMockito
see original Mockito.doNothing()
willNothing() - Method in interface org.mockito.BDDMockito.BDDStubber
See original Stubber.doNothing()
willNothing() - Method in class org.mockito.BDDMockito.BDDStubberImpl
 
willReturn(T) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.thenReturn(Object)
willReturn(T, T...) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.thenReturn(Object, Object[])
willReturn(T) - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willReturn(T, T...) - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willReturn(Object) - Method in interface org.mockito.BDDMockito.BDDStubber
See original Stubber.doReturn(Object)
willReturn(Object) - Method in class org.mockito.BDDMockito.BDDStubberImpl
 
willReturn(Object) - Static method in class org.mockito.BDDMockito
see original Mockito.doReturn(Object)
willThrow(Throwable...) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.thenThrow(Throwable...)
willThrow(Class<? extends Throwable>...) - Method in interface org.mockito.BDDMockito.BDDMyOngoingStubbing
See original OngoingStubbing.thenThrow(Class[])
willThrow(Throwable...) - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willThrow(Class<? extends Throwable>...) - Method in class org.mockito.BDDMockito.BDDOngoingStubbingImpl
 
willThrow(Throwable) - Method in interface org.mockito.BDDMockito.BDDStubber
See original Stubber.doThrow(Throwable)
willThrow(Class<? extends Throwable>) - Method in interface org.mockito.BDDMockito.BDDStubber
See original Stubber.doThrow(Class)
willThrow(Throwable) - Method in class org.mockito.BDDMockito.BDDStubberImpl
 
willThrow(Class<? extends Throwable>) - Method in class org.mockito.BDDMockito.BDDStubberImpl
 
willThrow(Throwable) - Static method in class org.mockito.BDDMockito
see original Mockito.doThrow(Throwable)
willThrow(Class<? extends Throwable>) - Static method in class org.mockito.BDDMockito
see original Mockito.doThrow(Throwable)
withExtraTypeInfo() - Method in interface org.mockito.internal.matchers.ContainsExtraTypeInformation
 
withExtraTypeInfo() - Method in class org.mockito.internal.matchers.Equals
 
withExtraTypeInfo() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 
withMocks(Set<Object>) - Method in class org.mockito.internal.configuration.injection.MockInjection.OngoingMockInjection
 
withSettings() - Static method in class org.mockito.Mockito
Allows mock creation with additional mock settings.
WrongTypeOfReturnValue - Exception in org.mockito.exceptions.misusing
 
WrongTypeOfReturnValue(String) - Constructor for exception org.mockito.exceptions.misusing.WrongTypeOfReturnValue
 
wrongTypeOfReturnValue(String, String, String) - Method in class org.mockito.exceptions.Reporter
 

_

_dont_implement_Matcher___instead_extend_BaseMatcher_() - Method in class org.mockito.internal.matchers.LocalizedMatcher
 

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