Mockito - 0 Matchers Expected, 1 Recorded (InvalidUseOfMatchersException)

前端 未结 3 483
离开以前
离开以前 2021-01-17 13:28

I\'m trying to mock up some mongo classes so that I don\'t need a connection (fairly standard stuff) but the following code gives me problems:

when(dbCollect         


        
3条回答
  •  梦毁少年i
    2021-01-17 13:59

    Probably unrelated, but I encountered the same error when I spied a package private method. Changing it to public solved the issue for me.

提交回复
热议问题