use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotifyInput in project lispflowmapping by opendaylight.
the class LispSouthboundRpcTest method sendMapNotifyTest_inputNotNull.
/**
* Tests {@link LispSouthboundRPC#sendMapNotify} method.
*/
@Test
public void sendMapNotifyTest_inputNotNull() throws ExecutionException, InterruptedException {
final MapNotify mapNotify = getDefaultMapNotifyBuilder().build();
final TransportAddress transportAddress = new TransportAddressBuilder().build();
final SendMapNotifyInput sendMapNotifyInputMock = Mockito.mock(SendMapNotifyInput.class);
Mockito.when(sendMapNotifyInputMock.getTransportAddress()).thenReturn(transportAddress);
Mockito.when(sendMapNotifyInputMock.getMapNotify()).thenReturn(mapNotify);
assertEquals(RPC_RESULT_SUCCESS.isSuccessful(), lispSouthboundRPC.sendMapNotify(sendMapNotifyInputMock).get().isSuccessful());
Mockito.verify(lispSouthboundPlugin).handleSerializedLispBuffer(transportAddress, MapNotifySerializer.getInstance().serialize(mapNotify), MessageType.MapNotify);
}
Aggregations