use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapReplyInput in project lispflowmapping by opendaylight.
the class LispSouthboundRpcTest method sendMapReplyTest_inputNotNull.
/**
* Tests {@link LispSouthboundRPC#sendMapReply} method.
*/
@Test
public void sendMapReplyTest_inputNotNull() throws ExecutionException, InterruptedException {
final MapReply mapReply = getDefaultMapReplyBuilder().build();
final TransportAddress transportAddress = new TransportAddressBuilder().build();
final SendMapReplyInput sendMapReplyInputMock = Mockito.mock(SendMapReplyInput.class);
Mockito.when(sendMapReplyInputMock.getTransportAddress()).thenReturn(transportAddress);
Mockito.when(sendMapReplyInputMock.getMapReply()).thenReturn(mapReply);
assertEquals(RPC_RESULT_SUCCESS.isSuccessful(), lispSouthboundRPC.sendMapReply(sendMapReplyInputMock).get().isSuccessful());
Mockito.verify(lispSouthboundPlugin).handleSerializedLispBuffer(transportAddress, MapReplySerializer.getInstance().serialize(mapReply), MessageType.MapReply);
}
Aggregations