---
title: "org.mockito:mockito-core 5.0.0 Breaking Changes"
description: "What each org.mockito:mockito-core release removed, renamed or changed: 303 breaking changes in 4 versions on Maven Central, each with its source."
canonical_url: https://since.dev/packages/maven/org.mockito:mockito-core
last_updated: 2026-12-04
---

# 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

Latest version `5.25.0`. [Source repository](https://github.com/mockito/mockito)

Its 5.0.0 release requires [Java 11](https://since.dev/calendar/eclipse-temurin/11.md) or later. [Java end of life dates](https://since.dev/calendar/eclipse-temurin.md).

- From [4.0.0](#v-4-0-0) to [5.0.0](#v-5-0-0): 5 breaking changes in 1 version.
- From [2.1.0](#v-2-1-0) to [5.0.0](#v-5-0-0): 37 breaking changes in 3 versions.

## org.mockito:mockito-core 5.0.0 breaking changes

org.mockito:mockito-core 5.0.0, released January 14, 2023: 5 breaking changes.

- **Behavior changed**  

Mockito 5 supports Java 11 and above. Users on JDK 8 must stay on Mockito 4. [github.com](https://github.com/mockito/mockito/releases/tag/v5.0.0)
- **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](https://github.com/mockito/mockito/commit/064fe9028993a11ccf0ae12b5975b96baffcf305)
- **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](https://github.com/mockito/mockito/releases/tag/v5.0.0)
- **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](https://github.com/mockito/mockito/commit/064fe9028993a11ccf0ae12b5975b96baffcf305)
- **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](https://github.com/mockito/mockito/releases/tag/v5.0.0)

## org.mockito:mockito-core 4.0.0 breaking changes

org.mockito:mockito-core 4.0.0, released October 7, 2021: 31 breaking changes.

- **Removed** `org.mockito.Answers.get`  

Answers.get was removed in org.mockito:mockito-core 4.0.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.{is}{Not}Null`  

Call the matcher methods without the ignored Class argument. [github.com](https://github.com/mockito/mockito/releases/tag/v4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.any*Of`  

Use ArgumentMatchers#any instead of the typed any\*Of aliases. [github.com](https://github.com/mockito/mockito/releases/tag/v4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anyCollectionOf`  

ArgumentMatchers.anyCollectionOf was removed in org.mockito:mockito-core 4.0.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anyIterableOf`  

ArgumentMatchers.anyIterableOf was removed in org.mockito:mockito-core 4.0.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anyListOf`  

ArgumentMatchers.anyListOf was removed in org.mockito:mockito-core 4.0.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anyMapOf`  

ArgumentMatchers.anyMapOf was removed in org.mockito:mockito-core 4.0.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anyObject`  

Use ArgumentMatchers#any instead of anyObject. [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anySetOf`  

ArgumentMatchers.anySetOf was removed in org.mockito:mockito-core 4.0.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)
- **Removed** `org.mockito.ArgumentMatchers.anyVararg`  

Use ArgumentMatchers#any instead of anyVararg. [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/4.0.0)

And 21 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## org.mockito:mockito-core 3.0.0 breaking changes

org.mockito:mockito-core 3.0.0, released July 8, 2019: 1 breaking change.

- **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](https://github.com/mockito/mockito/releases/tag/v3.0.0)

## org.mockito:mockito-core 2.1.0 breaking changes

org.mockito:mockito-core 2.1.0, released October 3, 2016: 266 breaking changes.

- **Removed** `org.mockito.ArgumentCaptor.<init>`  

ArgumentCaptor.\<init> was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.ArgumentMatcher.<init>`  

ArgumentMatcher.\<init> was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.ArgumentMatcher.describeTo`  

ArgumentMatcher.describeTo was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.AnnotationVisitor`  

org.mockito.asm.AnnotationVisitor was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.Attribute`  

org.mockito.asm.Attribute was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.ByteVector`  

org.mockito.asm.ByteVector was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.ClassAdapter`  

org.mockito.asm.ClassAdapter was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.ClassReader`  

org.mockito.asm.ClassReader was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.ClassVisitor`  

org.mockito.asm.ClassVisitor was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)
- **Removed** `org.mockito.asm.ClassWriter`  

org.mockito.asm.ClassWriter was removed in org.mockito:mockito-core 2.1.0 [central.sonatype.com](https://central.sonatype.com/artifact/org.mockito/mockito-core/2.1.0)

And 256 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Related packages

- [org.mockito:mockito-inline](https://since.dev/packages/maven/org.mockito:mockito-inline.md)
- [org.mockito:mockito-junit-jupiter](https://since.dev/packages/maven/org.mockito:mockito-junit-jupiter.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
