Suggest a tool

Mockito

Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.

What Mockito is

Mockito is a mocking framework for unit tests in Java. Mocks are created with mock() or the @Mock annotation. Stubbing with when() or given() defines how mocked methods respond. Verification checks that methods were called with specific arguments. Partial mocks come from spy() or @Spy. The @InjectMocks annotation injects mocks and spies automatically. Argument matchers such as any() and argument capture through @Captor are also documented. Mockito 5 requires Java 11 and uses mockito-inline as the default mockmaker. Only one major version receives support at a time.

Written from the project's README, read , and its documentation (see sources).

Category
Test data and mocking
License
MIT
Language
Java
Changelog
Releases on GitHub

Repository metrics

Repository metrics
Stars15,4571
Forks2,6701
Open issues and PRs4941
Contributors3491
Commits in the last 90 days91
Last commit2026-09-091
Last releasev5.23.0, 2026-03-111
Fetched

1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.

Status

activeLast commit within 90 days of the fetch date.

Computed from the last commit date and the archive flag on the fetch date. See the status rules.

Alternatives

Listed test data and mocking tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from Mockito's, with its source.

Comparisons

Questions

Is Mockito open source?

Yes. Mockito is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.

Is Mockito maintained?

On 2026-09-22, the last commit to the default branch was on 2026-09-09, so the listed status is active. Rule: Last commit within 90 days of the fetch date.

How many GitHub stars does Mockito have?

15,457 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.

What language is Mockito written in?

The repository's primary language, as reported by the GitHub API, is Java.

Sources

  1. GitHub REST API: repository, read
  2. GitHub REST API: commits, read
  3. GitHub REST API: latest release, read
  4. GitHub REST API: contributors, read
  5. README, read
  6. Mockito site, read