# org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers! 0 matchers expected, 1 recorded

- **ID:** `java/mockito-wrong-type-argument`
- **Domain:** java
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Mixing matchers and exact values in same method call, or using matchers outside of when/verify.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 8+ | active | — | — |

## Workarounds

1. **Use matchers for all parameters consistently** (95% success)
   ```
   when(mock.method(anyString(), anyInt())).thenReturn(value);
   ```
2. **Use eq() for exact values with matchers** (90% success)
   ```
   when(mock.method(eq("exact"), anyInt())).thenReturn(value);
   ```

## Dead Ends

- **Using any() for all parameters** — May cause UnnecessaryStubbingException if not all used. (50% fail)
- **Removing matchers and using exact values only** — Reduces test flexibility; may not match actual calls. (40% fail)
