I am currently switching to Java 21 so far there are no real problems with Mockito.
But one thing is bothering me with Eclipse. In Test methods where i use "when" Eclipse shows me an Error that i am using an restricted Identifier (
Syntax error on token "RestrictedIdentifierWhen", delete this token) .
One Workarround is to use the fully qualified name instead of the static import.
Eclipse version:
2023-09 (4.29.0)Mockito version:
5.6.0JDTPlugin version: 1.2.300.v20230920-0334_BETA_JAVA21
This seems to be an Eclipse problem but maybe some of you have a better understanding how to resolve this.