Search in sources :

Example 1 with SendMapNotifyInput

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);
}
Also used : SendMapNotifyInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotifyInput) TransportAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress) MapNotify(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapnotifymessage.MapNotify) TransportAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MapNotify (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapnotifymessage.MapNotify)1 TransportAddress (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress)1 TransportAddressBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder)1 SendMapNotifyInput (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotifyInput)1