@Test
public void test() {
new NonStrictExpectations() {
{
aService.method1(anyString); result=abc
}
};
}
I am using Parameterized runner with jmockit. Now method1 of aService may or may not be invoked depending on test data. but jmockit throws MissingInvocation Exception.