Mockito在将argThat与自定义ArgumentMatcher一起使用时获取NPE然后,您可以使用longThat而不是argThat。在sub...
I tried to use a custom ArgumentMatcher, but I always get NPE, and for me it's hard to find the reason now, even though I found the NPE related in the documentation. @Test void debug() { class ListGetMatcher implements ArgumentMatcher<Integer> { public boolean matches(Integer index) {...
在这一点上,我决定取代那些火腿匹配和面对NPE。现在我意识到,我可以通过使用org.mockito.hamcrest.Mocki...