Search in sources :

Example 6 with ReplyCaller

use of io.joynr.dispatching.rpc.ReplyCaller in project joynr by bmwcarit.

the class RequestReplyManagerTest method replyCallerInvokedForIncomingReply.

@Test
public void replyCallerInvokedForIncomingReply() throws Exception {
    ReplyCaller replyCaller = mock(ReplyCaller.class);
    replyCallerDirectory.addReplyCaller(request1.getRequestReplyId(), replyCaller, ExpiryDate.fromRelativeTtl(TIME_TO_LIVE * 2));
    Reply reply = new Reply(request1.getRequestReplyId(), payload1);
    requestReplyManager.handleReply(reply);
    verify(replyCaller).messageCallBack(reply);
}
Also used : Reply(joynr.Reply) ReplyCaller(io.joynr.dispatching.rpc.ReplyCaller) Test(org.junit.Test)

Aggregations

ReplyCaller (io.joynr.dispatching.rpc.ReplyCaller)6 Test (org.junit.Test)5 SynchronizedReplyCaller (io.joynr.dispatching.rpc.SynchronizedReplyCaller)4 Reply (joynr.Reply)4 JsonParseException (com.fasterxml.jackson.core.JsonParseException)3 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)3 IOException (java.io.IOException)3 ArgumentCaptor (org.mockito.ArgumentCaptor)3 Matchers.anyString (org.mockito.Matchers.anyString)3 InvocationOnMock (org.mockito.invocation.InvocationOnMock)3 TextNode (com.fasterxml.jackson.databind.node.TextNode)1 ExpiryDate (io.joynr.common.ExpiryDate)1 JoynrCommunicationException (io.joynr.exceptions.JoynrCommunicationException)1 ApplicationException (joynr.exceptions.ApplicationException)1