Turns out that FakeHapiConnectionHubFactory was not returning the same
instance both when defining the matcher in when() and in the code under
test. Consequently, the attach() method call under test did not match the
when() matcher because though its arguments may have matched, the object
instance
How does one mock ConnectionHub.attach() using Mockito? Here is my
unsuccessful attempt where the matcher fails to match:
public TestHl7GatewayStatusUpdateSender() throws HL7Exception
{
mConnectionHubFactory = new FakeHapiConnectionHubFactory();
Connection fakeConnection =
2 matches
Mail list logo