2 * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.genius.arputil.test;
10 import static org.opendaylight.yangtools.testutils.mockito.MoreAnswers.realOrException;
12 import com.google.common.util.concurrent.Futures;
13 import com.google.common.util.concurrent.ListenableFuture;
14 import org.mockito.Mockito;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketOutput;
18 import org.opendaylight.yangtools.yang.common.RpcResult;
19 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
21 public class TestPacketProcessingService implements PacketProcessingService {
23 public static TestPacketProcessingService newInstance() {
24 return Mockito.mock(TestPacketProcessingService.class, realOrException());
28 public ListenableFuture<RpcResult<TransmitPacketOutput>> transmitPacket(TransmitPacketInput input) {
29 RpcResultBuilder<TransmitPacketOutput> rpcResultBuilder = RpcResultBuilder.success();
30 return Futures.immediateFuture(rpcResultBuilder.build());