# org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked

**Code:** `Wanted but not invoked` · **Category:** Java · **Seen on:** Java

`verify(mock).method()` did not find that call.

## Meaning

The message lists the wanted call and the actual interactions. Argument differences are shown as "Actual invocation has different arguments".

## Common causes

- Method never called
- Called with different arguments
- Called on another mock instance
- Mock injected into the wrong field

## Quick fix

1. Compare "Wanted" and "Actual" lines
2. Use matchers (`any()`, `eq()`) consistently
3. Check @InjectMocks wiring

## Detailed fix by platform

### Mockito

1. `verify(service).send(eq("a@b.c"), any());`

## How to diagnose

1. **Wanted** — Which call?
2. **Actual** — Which interactions?
3. **Mock** — Same instance?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/java/mockito-wanted-but-not-invoked)
