1

Getting following exceptions when run all tests together but works as expected when executed individually

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Misplaced or misused argument matcher detected here

java.lang.NullPointerException: Cannot invoke "[Ljava.lang.Class;.clone()" because ".parameterTypes" is null

1
  • Please provide some of your Code. Otherwise it is impossible to see whats wrong Commented May 15, 2022 at 16:01

1 Answer 1

1

Please check whether you have mocked java.lang.reflect.Method (or any java reflection types) in one of your test classes?

use getClass().getMethod() like approach to get it done instead of mocking relect types becasue java not allows to do that.

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.