as the title suggests, the problem is this: I have the mock of AdesioneMerger
and I have to call the real merge
method. merge
is a void method.
This is wrong:
adesioneMerger = Mockito.spy(AdesioneMerger.class);
Mockito.when(adesioneMerger.merge(
Matchers.any(AdesioneBean.class),
Matchers.any(Adesione.class),
Matchers.any(ServiceResultBean.class))
).ThenCallRealMethod();
what's the error?