use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRequestInput in project lispflowmapping by opendaylight.
the class LispSouthboundRpcTest method sendMapRequestTest_inputNotNull.
/**
* Tests {@link LispSouthboundRPC#sendMapRequest} method.
*/
@Test
public void sendMapRequestTest_inputNotNull() throws ExecutionException, InterruptedException {
final MapRequest mapRequest = new MapRequestBuilder().build();
final TransportAddress transportAddress = new TransportAddressBuilder().build();
final SendMapRequestInput sendMapRequestInputMock = Mockito.mock(SendMapRequestInput.class);
Mockito.when(sendMapRequestInputMock.getTransportAddress()).thenReturn(transportAddress);
Mockito.when(sendMapRequestInputMock.getMapRequest()).thenReturn(mapRequest);
assertEquals(RPC_RESULT_SUCCESS.isSuccessful(), lispSouthboundRPC.sendMapRequest(sendMapRequestInputMock).get().isSuccessful());
Mockito.verify(lispSouthboundPlugin).handleSerializedLispBuffer(transportAddress, MapRequestSerializer.getInstance().serialize(mapRequest), MessageType.MapRequest);
}
Aggregations