How to use soft assertions in Mockito?
问题 I know that we can use ErrorCollector or soft assertions (AssertJ or TestNG) that do not fail a unit test immediately. How they can be used with Mockito assertions? Or if they can't, does Mockito provide any alternatives? Code sample verify(mock).isMethod1(); verify(mock, times(1)).callMethod2(any(StringBuilder.class)); verify(mock, never()).callMethod3(any(StringBuilder.class)); verify(mock, never()).callMethod4(any(String.class)); Problem In this snippet of code if a verification will fail,