org.mockito:mockito-core breaking changes
org.mockito:mockito-core 5.0.0 (January 14, 2023) is its newest release with breaking changes, 5 of them. The first: org.mockito:mockito-core 5.0.0 requires Java 11 or later. Every breaking API change we have recorded in org.mockito:mockito-core on Maven Central: 303 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 5.25.0. Source repository
Its 5.0.0 release requires Java 11 or later. Java end of life dates.
- From 4.0.0 to 5.0.0: 5 breaking changes in 1 version.
- From 2.1.0 to 5.0.0: 37 breaking changes in 3 versions.
org.mockito:mockito-core 5.0.0 breaking changes
- Behavior changed
Mockito 5 supports Java 11 and above. Users on JDK 8 must stay on Mockito 4. github.com - Behavior changed
any
Passed to a varargs parameter, any() now matches exactly one argument; to match any number of arguments, pass the varargs array type such as any(String[].class). github.com - Behavior changed
ArgumentCaptor.forClass
For varargs parameters, a captor for String captures one value; to capture all arguments, use a captor for String[]. github.com - Behavior changed
MockitoHamcrest
Passed to a varargs parameter, MockitoHamcrest matchers now match exactly one argument instead of each element; pass the varargs array type to match any number. github.com - Default changed
The default mockmaker is now the inline one based on mockito-inline. Users who need the subclass mockmaker must add the mockito-subclass artifact. github.com
org.mockito:mockito-core 4.0.0 breaking changes
- Removed
org.mockito.Answers.get
Answers.get was removed in org.mockito:mockito-core 4.0.0 central.sonatype.com - Removed
org.mockito.ArgumentMatchers.{is}{Not}Null
Call the matcher methods without the ignored Class argument. github.com - Removed
org.mockito.ArgumentMatchers.any*Of
Use ArgumentMatchers#any instead of the typed any*Of aliases. github.com - Removed
org.mockito.ArgumentMatchers.anyCollectionOf
ArgumentMatchers.anyCollectionOf was removed in org.mockito:mockito-core 4.0.0 central.sonatype.com - Removed
org.mockito.ArgumentMatchers.anyIterableOf
ArgumentMatchers.anyIterableOf was removed in org.mockito:mockito-core 4.0.0 central.sonatype.com - Removed
org.mockito.ArgumentMatchers.anyListOf
ArgumentMatchers.anyListOf was removed in org.mockito:mockito-core 4.0.0 central.sonatype.com - Removed
org.mockito.ArgumentMatchers.anyMapOf
ArgumentMatchers.anyMapOf was removed in org.mockito:mockito-core 4.0.0 central.sonatype.com - Removed
org.mockito.ArgumentMatchers.anyObject
Use ArgumentMatchers#any instead of anyObject. central.sonatype.com - Removed
org.mockito.ArgumentMatchers.anySetOf
ArgumentMatchers.anySetOf was removed in org.mockito:mockito-core 4.0.0 central.sonatype.com - Removed
org.mockito.ArgumentMatchers.anyVararg
Use ArgumentMatchers#any instead of anyVararg. central.sonatype.com
And 21 more in this version. Sign up to see every change
org.mockito:mockito-core 3.0.0 breaking changes
- Removed
Mockito 3.0.0 requires Java 8. Projects running on older Java versions must upgrade their Java runtime before using this release. github.com
org.mockito:mockito-core 2.1.0 breaking changes
- Removed
org.mockito.ArgumentCaptor.<init>
ArgumentCaptor.<init> was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.ArgumentMatcher.<init>
ArgumentMatcher.<init> was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.ArgumentMatcher.describeTo
ArgumentMatcher.describeTo was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.AnnotationVisitor
org.mockito.asm.AnnotationVisitor was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.Attribute
org.mockito.asm.Attribute was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.ByteVector
org.mockito.asm.ByteVector was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.ClassAdapter
org.mockito.asm.ClassAdapter was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.ClassReader
org.mockito.asm.ClassReader was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.ClassVisitor
org.mockito.asm.ClassVisitor was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com - Removed
org.mockito.asm.ClassWriter
org.mockito.asm.ClassWriter was removed in org.mockito:mockito-core 2.1.0 central.sonatype.com
And 256 more in this version. Sign up to see every change
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.