2 * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.impl.services.sal;
10 import static org.mockito.Mockito.verify;
12 import java.util.List;
13 import org.junit.Test;
14 import org.opendaylight.openflowplugin.impl.services.ServiceMocking;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.mp.message.service.rev151020.SendExperimenterMpRequestInputBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
19 public class SendExperimenterMpRequestImplTest extends ServiceMocking {
20 private SendExperimenterMpRequestImpl sendExperimenterMpRequest;
23 protected void setup() {
24 this.<List<MultipartReply>>mockSuccessfulFuture();
26 sendExperimenterMpRequest = new SendExperimenterMpRequestImpl(mockedRequestContextStack, mockedDeviceContext,
27 mockedExtensionConverterProvider);
31 public void sendExperimenterMpRequest() {
32 sendExperimenterMpRequest.invoke(new SendExperimenterMpRequestInputBuilder()
33 .setExperimenterMessageOfChoice(mockExperimenter())
34 .setNode(new NodeRef(mockedDeviceInfo.getNodeInstanceIdentifier()))
36 verify(mockedRequestContextStack).createRequestContext();