# Mockito changelog > The mocking framework for Java unit tests. - Vendor: Mockito - Category: Frameworks & Libraries - Official site: https://site.mockito.org - Tracked by: What's New (https://whatsnew.fyi/product/mockito) - Harvested from: GitHub (mockito/mockito) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## Releases ### v5.23.0 - Date: 2026-03-11 - Version: v5.23.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.23.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.23.0 - **changed** — Replace mockito-android mock maker implementation with dexmaker-mockito-inline - **fixed** — Fix StackOverflowError with AbstractList after using mockSingleton - **changed** — Mark parameters of Mockito.when @Nullable - **changed** — mockito-android now requires a device or emulator based on API 28+ (Android P) for tests ##### NOTE: Breaking change for Android The `mockito-android` artifact has a breaking change: tests now require a device or emulator based on API 28+ (Android P). This is to enable new support for mocking Kotlin classes. See #3788 for more details. _______________ *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.23.0 - 2026-03-11 - [6 commit(s)](https://github.com/mockito/mockito/compare/v5.22.0...v5.23.0) by Brice Dutheil, Joshua Selbo, Philippe Kernevez - Replace mockito-android mock maker implementation with dexmaker-mockito-inline [(#3792)](https://github.com/mockito/mockito/pull/3792) - Fix StackOverflowError with AbstractList after using mockSingleton [(#3790)](https://github.com/mockito/mockito/pull/3790) - Mark parameters of `Mockito.when` `@Nullable` [(#3503)](https://github.com/mockito/mockito/issues/3503) ### v5.22.0 - Date: 2026-02-27 - Version: v5.22.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.22.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.22.0 - **fixed** — Avoid mocking of internal static utilities - **fixed** — Static mocking of UUID.class corrupted under JDK 25 - **added** — Add core API to enable Kotlin singleton mocking - **changed** — Clarify RETURNS_MOCKS behavior with sealed abstract enums (Java 15+) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.22.0 - 2026-02-27 - [6 commit(s)](https://github.com/mockito/mockito/compare/v5.21.0...v5.22.0) by Joshua Selbo, NiMv1, Rafael Winterhalter, dependabot[bot], eunbin son - Avoid mocking of internal static utilities [(#3785)](https://github.com/mockito/mockito/pull/3785) - Bump graalvm/setup-graalvm from 1.4.4 to 1.4.5 [(#3780)](https://github.com/mockito/mockito/pull/3780) - Static mocking of UUID.class corrupted under JDK 25 [(#3778)](https://github.com/mockito/mockito/issues/3778) - Bump actions/upload-artifact from 5 to 6 [(#3774)](https://github.com/mockito/mockito/pull/3774) - docs: clarify RETURNS_MOCKS behavior with sealed abstract enums (Java 15+) [(#3773)](https://github.com/mockito/mockito/pull/3773) - Add tests for Sets utility class [(#3771)](https://github.com/mockito/mockito/pull/3771) - Add core API to enable Kotlin singleton mocking [(#3762)](https://github.com/mockito/mockito/pull/3762) - Stubbing Kotlin `object` singletons [(#3652)](https://github.com/mockito/mockito/issues/3652) - Incorrect documentation for RETURNS_MOCKS [(#3285)](https://github.com/mockito/mockito/issues/3285) ### v5.21.0 - Date: 2025-12-09 - Version: v5.21.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.21.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.21.0 - **added** — Output matchers to potential mismatch messages - **added** — Automatically detect class to mock in mockStatic and mockConstruction - **added** — Return completed futures for unstubbed Future/CompletionStage in ReturnsEmptyValues - **added** — Support primitives in GenericArrayReturnType - **fixed** — StackOverflowError when mocking WeakReference - **fixed** — ClassNotFoundException when stubbing array of primitive type on Android - **removed** — Forbid mocking WeakReference with inline mock maker *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.21.0 - 2025-12-09 - [17 commit(s)](https://github.com/mockito/mockito/compare/v5.20.0...v5.21.0) by Giulio Longfils, Joshua Selbo, Woongi9, Zylox, dependabot[bot] - Bump graalvm/setup-graalvm from 1.4.3 to 1.4.4 [(#3768)](https://github.com/mockito/mockito/pull/3768) - Bump graalvm/setup-graalvm from 1.4.2 to 1.4.3 [(#3767)](https://github.com/mockito/mockito/pull/3767) - Bump actions/checkout from 5 to 6 [(#3765)](https://github.com/mockito/mockito/pull/3765) - Adds output of matchers to potential mismatch; Fixes #2468 [(#3760)](https://github.com/mockito/mockito/pull/3760) - Forbid mocking WeakReference with inline mock maker [(#3759)](https://github.com/mockito/mockito/pull/3759) - StackOverflowError when mocking WeakReference [(#3758)](https://github.com/mockito/mockito/issues/3758) - Bump actions/upload-artifact from 4 to 5 [(#3756)](https://github.com/mockito/mockito/pull/3756) - Bump graalvm/setup-graalvm from 1.4.1 to 1.4.2 [(#3755)](https://github.com/mockito/mockito/pull/3755) - Support primitives in GenericArrayReturnType. [(#3753)](https://github.com/mockito/mockito/pull/3753) - ClassNotFoundException when stubbing array of primitive type on Android [(#3752)](https://github.com/mockito/mockito/issues/3752) - Bump graalvm/setup-graalvm from 1.4.0 to 1.4.1 [(#3744)](https://github.com/mockito/mockito/pull/3744) - Bump gradle/actions from 4 to 5 [(#3743)](https://github.com/mockito/mockito/pull/3743) - Bump org.graalvm.buildtools.native from 0.11.0 to 0.11.1 [(#3738)](https://github.com/mockito/mockito/pull/3738) - Bump com.diffplug.spotless:spotless-plugin-gradle from 7.2.1 to 8.0.0 [(#3735)](https://github.com/mockito/mockito/pull/3735) - Bump graalvm/setup-graalvm from 1.3.7 to 1.4.0 [(#3734)](https://github.com/mockito/mockito/pull/3734) - Bump org.assertj:assertj-core from 3.27.5 to 3.27.6 [(#3733)](https://github.com/mockito/mockito/pull/3733) - Bump errorprone from 2.41.0 to 2.42.0 [(#3732)](https://github.com/mockito/mockito/pull/3732) - Feat: automatically detect class to mock in mockStatic and mockConstruction [(#3731)](https://github.com/mockito/mockito/pull/3731) - Return completed futures for unstubbed Future/CompletionStage in ReturnsEmptyValues [(#3727)](https://github.com/mockito/mockito/pull/3727) - automatically detect class to mock [(#2779)](https://github.com/mockito/mockito/pull/2779) - Incorrect "has following stubbing(s) with different arguments" message when using Argument Matchers [(#2468)](https://github.com/mockito/mockito/issues/2468) ### v5.20.0 - Date: 2025-09-20 - Version: v5.20.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.20.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.20.0 - **added** — Add ability to mock construction of generic types - **added** — Add support for JDK21 Sequenced Collections - **fixed** — Fix issue #3709 *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.20.0 - 2025-09-20 - [11 commit(s)](https://github.com/mockito/mockito/compare/v5.19.0...v5.20.0) by Adrian-Kim, Giulio Longfils, Rafael Winterhalter, dependabot[bot] - Bump org.assertj:assertj-core from 3.27.4 to 3.27.5 [(#3730)](https://github.com/mockito/mockito/pull/3730) - Introducing the Ability to Mock Construction of Generic Types (#2401) [(#3729)](https://github.com/mockito/mockito/pull/3729) - Bump com.gradle.develocity from 4.1.1 to 4.2 [(#3726)](https://github.com/mockito/mockito/pull/3726) - Bump graalvm/setup-graalvm from 1.3.6 to 1.3.7 [(#3725)](https://github.com/mockito/mockito/pull/3725) - Bump org.eclipse.platform:org.eclipse.osgi from 3.23.100 to 3.23.200 [(#3720)](https://github.com/mockito/mockito/pull/3720) - Bump graalvm/setup-graalvm from 1.3.5 to 1.3.6 [(#3719)](https://github.com/mockito/mockito/pull/3719) - Bump actions/setup-java from 4 to 5 [(#3715)](https://github.com/mockito/mockito/pull/3715) - Bump com.gradle.develocity from 4.1 to 4.1.1 [(#3713)](https://github.com/mockito/mockito/pull/3713) - Bump bytebuddy from 1.17.6 to 1.17.7 [(#3712)](https://github.com/mockito/mockito/pull/3712) - test: Use Assume.assumeThat for SequencedCollection tests [(#3711)](https://github.com/mockito/mockito/pull/3711) - Fix #3709 [(#3710)](https://github.com/mockito/mockito/pull/3710) - feat: Add support for JDK21 Sequenced Collections. [(#3708)](https://github.com/mockito/mockito/pull/3708) - Introducing the Ability to Mock Construction of Generic Types [(#2401)](https://github.com/mockito/mockito/issues/2401) ### v5.19.0 - Date: 2025-08-15 - Version: v5.19.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.19.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.19.0 - **added** — Add support for JDK21 Sequenced Collections - **changed** — Allow overriding 'Created-By' for reproducible builds *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.19.0 - 2025-08-15 - [37 commit(s)](https://github.com/mockito/mockito/compare/v5.18.0...v5.19.0) by Adrian-Kim, Tim van der Lippe, Tran Ngoc Nhan, dependabot[bot], juyeop - feat: Add support for JDK21 Sequenced Collections. [(#3708)](https://github.com/mockito/mockito/pull/3708) - Bump actions/checkout from 4 to 5 [(#3707)](https://github.com/mockito/mockito/pull/3707) - build: Allow overriding 'Created-By' for reproducible builds [(#3704)](https://github.com/mockito/mockito/pull/3704) - Bump org.assertj:assertj-core from 3.27.3 to 3.27.4 [(#3703)](https://github.com/mockito/mockito/pull/3703) - Bump androidx.test:runner from 1.6.2 to 1.7.0 [(#3697)](https://github.com/mockito/mockito/pull/3697) - Bump org.junit.platform:junit-platform-launcher from 1.13.3 to 1.13.4 [(#3694)](https://github.com/mockito/mockito/pull/3694) - Bump com.diffplug.spotless:spotless-plugin-gradle from 7.1.0 to 7.2.1 [(#3693)](https://github.com/mockito/mockito/pull/3693) - Bump junit-jupiter from 5.13.3 to 5.13.4 [(#3691)](https://github.com/mockito/mockito/pull/3691) - Bump com.gradle.develocity from 4.0.2 to 4.1 [(#3689)](https://github.com/mockito/mockito/pull/3689) - Bump com.google.googlejavaformat:google-java-format from 1.27.0 to 1.28.0 [(#3688)](https://github.com/mockito/mockito/pull/3688) - Bump com.google.googlejavaformat:google-java-format from 1.25.2 to 1.27.0 [(#3686)](https://github.com/mockito/mockito/pull/3686) - Bump com.diffplug.spotless:spotless-plugin-gradle from 7.0.4 to 7.1.0 [(#3685)](https://github.com/mockito/mockito/pull/3685) - Bump junit-jupiter from 5.13.2 to 5.13.3 [(#3684)](https://github.com/mockito/mockito/pull/3684) - Bump org.shipkit:shipkit-auto-version from 2.1.0 to 2.1.2 [(#3683)](https://github.com/mockito/mockito/pull/3683) - Bump com.diffplug.spotless:spotless-plugin-gradle from 7.0.2 to 7.0.4 [(#3682)](https://github.com/mockito/mockito/pull/3682) - Only run release after both Java and Android tests have finished [(#3681)](https://github.com/mockito/mockito/pull/3681) - Bump org.junit.platform:junit-platform-launcher from 1.12.2 to 1.13.3 [(#3680)](https://github.com/mockito/mockito/pull/3680) - Bump org.codehaus.groovy:groovy from 3.0.24 to 3.0.25 [(#3679)](https://github.com/mockito/mockito/pull/3679) - Bump org.eclipse.platform:org.eclipse.osgi from 3.23.0 to 3.23.100 [(#3678)](https://github.com/mockito/mockito/pull/3678) - Can no longer publish snapshot releases [(#3677)](https://github.com/mockito/mockito/issues/3677) - Update Gradle to 8.14.2 [(#3676)](https://github.com/mockito/mockito/pull/3676) - Bump errorprone from 2.23.0 to 2.39.0 [(#3674)](https://github.com/mockito/mockito/pull/3674) - Correct Junit docs link [(#3672)](https://github.com/mockito/mockito/pull/3672) - Bump net.ltgt.gradle:gradle-errorprone-plugin from 4.1.0 to 4.3.0 [(#3670)](https://github.com/mockito/mockito/pull/3670) - Bump junit-jupiter from 5.13.1 to 5.13.2 [(#3669)](https://github.com/mockito/mockito/pull/3669) - Bump bytebuddy from 1.17.5 to 1.17.6 [(#3668)](https://github.com/mockito/mockito/pull/3668) - Bump junit-jupiter from 5.12.2 to 5.13.1 [(#3666)](https://github.com/mockito/mockito/pull/3666) - Bump org.jetbrains.kotlin:kotlin-stdlib from 2.0.21 to 2.2.0 [(#3665)](https://github.com/mockito/mockito/pull/3665) - Bump org.gradle.toolchains.foojay-resolver-convention from 0.9.0 to 1.0.0 [(#3661)](https://github.com/mockito/mockito/pull/3661) - Bump org.junit.platform:junit-platform-launcher from 1.11.4 to 1.12.2 [(#3660)](https://github.com/mockito/mockito/pull/3660) - Add JDK21 sequenced collections for ReturnsEmptyValues [(#3659)](https://github.com/mockito/mockito/issues/3659) - Bump com.gradle.develocity from 3.19.1 to 4.0.2 [(#3658)](https://github.com/mockito/mockito/pull/3658) - Bump ru.vyarus:gradle-animalsniffer-plugin from 1.7.2 to 2.0.1 _[Truncated at 4000 characters — full notes: https://github.com/mockito/mockito/releases/tag/v5.19.0]_ ### v5.18.0 - Date: 2025-05-20 - Version: v5.18.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.18.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.18.0 - **changed** — Make vararg checks Scala friendly for mockito-scala - **changed** — For UnfinishedStubbingException, suggest the possibility of another thread *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.18.0 - 2025-05-20 - [5 commit(s)](https://github.com/mockito/mockito/compare/v5.17.0...v5.18.0) by Eugene Platonov, Patrick Doyle, Tim van der Lippe, dependabot[bot] - Make vararg checks Scala friendly (for mockito-scala) [(#3651)](https://github.com/mockito/mockito/pull/3651) - For UnfinishedStubbingException, suggest the possibility of another thread [(#3636)](https://github.com/mockito/mockito/pull/3636) - UnfinishedStubbingException ought to suggest the possibility of another thread [(#3635)](https://github.com/mockito/mockito/issues/3635) ### v5.17.0 - Date: 2025-04-04 - Version: v5.17.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.17.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.17.0 - **fixed** — Fix broken banner image link - **fixed** — MockitoExtension fails cleanup when aborted before setup - **changed** — Update exception message with mockito-inline - **fixed** — Fall back to Throwable Location strategy on Android - **fixed** — Fix broken links to javadoc.io *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.17.0 - 2025-04-04 - [7 commit(s)](https://github.com/mockito/mockito/compare/v5.16.1...v5.17.0) by Adrian Roos, Andre Kurait, Jan Ouwens, Rafael Winterhalter, Taeik Lim, Thach Le, Tim van der Lippe - Fixes #3631: Fix broken banner image link [(#3632)](https://github.com/mockito/mockito/pull/3632) - Banner image is broken [(#3631)](https://github.com/mockito/mockito/issues/3631) - Update exception message with mockito-inline [(#3628)](https://github.com/mockito/mockito/pull/3628) - Clarify structure of commit messages [(#3626)](https://github.com/mockito/mockito/pull/3626) - Fixes #3622: MockitoExtension fails cleanup when aborted before setup [(#3623)](https://github.com/mockito/mockito/pull/3623) - MockitoExtension fails cleanup when aborted before setup [(#3622)](https://github.com/mockito/mockito/issues/3622) - Since mockito-inline has been removed, the exception messages with `mockito-inline` should be modified. [(#3621)](https://github.com/mockito/mockito/issues/3621) - Fixes #3171: Fall back to Throwable Location strategy on Android [(#3619)](https://github.com/mockito/mockito/pull/3619) - Fixes #3615 : broken links to javadoc.io [(#3616)](https://github.com/mockito/mockito/pull/3616) - Broken links to javadoc.io [(#3615)](https://github.com/mockito/mockito/issues/3615) - Mocks are not working on particular devices after update Android SDK from 33 to 34 [(#3171)](https://github.com/mockito/mockito/issues/3171) ### v5.16.1 - Date: 2025-03-15 - Version: v5.16.1 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.16.1 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.16.1 - **fixed** — Remove Arrays.asList from critical stubbing path in GenericMetadataSupplier - **changed** — Rework injection strategy in the context of modules - **fixed** — Adjust inline mocking snippet to allow task relocatability *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.16.1 - 2025-03-15 - [3 commit(s)](https://github.com/mockito/mockito/compare/v5.16.0...v5.16.1) by Adrian Roos, Jérôme Prinet, Rafael Winterhalter - Remove Arrays.asList from critical stubbing path in GenericMetadataSu… [(#3610)](https://github.com/mockito/mockito/pull/3610) - Rework of injection strategy in the context of modules [(#3608)](https://github.com/mockito/mockito/pull/3608) - Adjust inline mocking snippet to allow task relocatability [(#3606)](https://github.com/mockito/mockito/pull/3606) - Inline mocking configuration snippet for Gradle should allow task relocatability [(#3605)](https://github.com/mockito/mockito/issues/3605) ### v5.16.0 - Date: 2025-03-03 - Version: v5.16.0 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.16.0 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.16.0 - **added** — Support for including module-info in Mockito - **changed** — Tweaks documentation on mockito agent config for maven - **fixed** — Refine reflection when calling management factory - **fixed** — Avoid warning when dynamic attach is enabled *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.16.0 - 2025-03-03 - [10 commit(s)](https://github.com/mockito/mockito/compare/v5.15.2...v5.16.0) by Brice Dutheil, Rafael Winterhalter, TDL, dependabot[bot] - Add support for including module-info in Mockito. [(#3597)](https://github.com/mockito/mockito/pull/3597) - Bump com.gradle.develocity from 3.19 to 3.19.1 [(#3579)](https://github.com/mockito/mockito/pull/3579) - Bump org.assertj:assertj-core from 3.27.2 to 3.27.3 [(#3577)](https://github.com/mockito/mockito/pull/3577) - Bump com.diffplug.spotless:spotless-plugin-gradle from 7.0.1 to 7.0.2 [(#3574)](https://github.com/mockito/mockito/pull/3574) - Bump com.diffplug.spotless:spotless-plugin-gradle from 6.25.0 to 7.0.1 [(#3571)](https://github.com/mockito/mockito/pull/3571) - Bump org.assertj:assertj-core from 3.27.1 to 3.27.2 [(#3569)](https://github.com/mockito/mockito/pull/3569) - Tweaks documentation on mockito agent config for maven [(#3568)](https://github.com/mockito/mockito/pull/3568) - Adds `--info` to diagnose closeAndReleaseStagingRepositories issues [(#3567)](https://github.com/mockito/mockito/pull/3567) - Refine reflection when calling management factory [(#3566)](https://github.com/mockito/mockito/pull/3566) - Avoid warning when dynamic attach is enabled [(#3551)](https://github.com/mockito/mockito/pull/3551) ### v5.15.2 - Date: 2025-01-02 - Version: v5.15.2 - Original notes: https://github.com/mockito/mockito/releases/tag/v5.15.2 - Permalink: https://whatsnew.fyi/product/mockito/releases/v5.15.2 - **fixed** — Fix javadoc publication - **changed** — Bump org.assertj:assertj-core from 3.27.0 to 3.27.1 *Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)* ###### 5.15.2 - 2025-01-02 - [2 commit(s)](https://github.com/mockito/mockito/compare/v5.15.1...v5.15.2) by Brice Dutheil, dependabot[bot] - Fix javadoc publication [(#3561)](https://github.com/mockito/mockito/pull/3561) - Bump org.assertj:assertj-core from 3.27.0 to 3.27.1 [(#3560)](https://github.com/mockito/mockito/pull/3560) - The release job is failed again [(#3542)](https://github.com/mockito/mockito/issues/3542)