How to resolve Unneccessary Stubbing exception

前端 未结 13 1446
无人共我
无人共我 2020-12-24 03:57

My Code is as below,

@RunWith(MockitoJUnitRunner.class)
public class MyClass {

    private static final String code =\"Test\";

    @Mock
     private MyCl         


        
13条回答
  •  半阙折子戏
    2020-12-24 04:38

    If you're using this style instead:

    @Rule
    public MockitoRule rule = MockitoJUnit.rule().strictness(Strictness.STRICT_STUBS);
    

    replace it with:

    @Rule
    public MockitoRule rule = MockitoJUnit.rule().silent();
    

提交回复
热议问题