org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Misplaced argument matcher detected here: -> at org.openmrs.module.idgen.web.controller.IdentifierSourceRestControllerTest.shouldThrowAnExceptionWhenARequiredParameterIsMissing(IdentifierSourceRestControllerTest.java:209) You cannot use argument matchers outside of verification or stubbing. Examples of correct usage of argument matchers: when(mock.get(anyInt())).thenReturn(null); doThrow(new RuntimeException()).when(mock).someVoidMethod(anyObject()); verify(mock).someMethod(contains("foo")) Also, this error might show up because you use argument matchers with methods that cannot be mocked. Following methods *cannot* be stubbed/verified: final/private/equals()/hashCode().
org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Misplaced argument matcher detected here:
-> at org.openmrs.module.idgen.web.controller.IdentifierSourceRestControllerTest.shouldThrowAnExceptionWhenARequiredParameterIsMissing(IdentifierSourceRestControllerTest.java:209)
You cannot use argument matchers outside of verification or stubbing.
Examples of correct usage of argument matchers:
(37 more lines...)
|