Mockito and interface event
问题 I am writing an integration test using mockito. The unit under test is connected to a mocked object (objA) through an interface. The functionality that I am trying to mimic happens when the mocked objected fires an event and the unit under test is listening to it. The interface: public interface MyInterfaceAPI{ void fireyMyEvent(String msg); } The unit under test: public class UnitUnderTest{ ObjA objA; public UnitUnderTest(ObjA objA_t) { objA = objA_t; objA.addMyListener(new addMyHandler());