Mockito
Some data may be outdated — see provenance labels.
Most popular Mocking framework for unit tests written in Java observed · 2026-09-22
Health v2 · maintenance only
82/100
- Activity 94
- Release rhythm 55
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 36
- age_days: 5120
- days_rel: 223
- days_push: 41
- n_releases_24m: 12
Adoption not part of the score
15457 stars · 2669 forks observed · 2026-09-22
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Mockito is the most popular mocking framework for unit tests written in Java, with a clean API for creating test doubles and verifying interactions. A companion mockito-kotlin library provides idiomatic Kotlin support.
Use cases
- mock dependencies in java unit tests
- create test doubles for junit tests
- verify method calls in tests
- stub method return values in java
- write tdd-style tests with mocks
- mock kotlin classes in tests
When to choose
- you write unit tests in Java or Kotlin on the JVM
- you need to isolate classes from their dependencies in tests
- you want a mature, widely-documented mocking library with strong IDE and build-tool support
When to avoid
- you are testing outside the JVM ecosystem
- you prefer integration tests over isolated unit tests with mocks
- you need a different test-double style like contract testing
Facets
library · maturity stable
mocking testing testing developer-tools jvm unit-testing test-doubles tdd mockito-kotlin java-library jvm
2 sources
- readme: https://github.com/mockito/mockito · fetched 2026-09-22 · cf80227da847
- homepage: http://mockito.org · fetched 2026-10-19 · bd08c4ce53cb
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mockito/mockito | main | 82 |
| mockito/mockito-kotlin | sdk | 78 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem