mockito : how to unmock a method?

后端 未结 7 1040
情深已故
情深已故 2021-01-01 08:48

I have a JUnit class with different methods to perform different tests.

I use Mockito to create a spy on real instance, and then ov

7条回答
  •  北海茫月
    2021-01-01 09:10

    Maybe I am not following but when you have a real object real:

    Object mySpy = spy(real);
    

    Then to "unspy" mySpy... just use real.

提交回复
热议问题