OPNFLWPLUG-1010 Adopt mdsal changes proposed through weather item TSC-99
[openflowplugin.git] / applications / forwardingrules-manager / src / test / java / test / mock / util / SalBundleServiceMock.java
1 /**
2  * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8
9 package test.mock.util;
10
11 import com.google.common.util.concurrent.ListenableFuture;
12 import java.util.ArrayList;
13 import java.util.List;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesOutput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleInput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleOutput;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
19 import org.opendaylight.yangtools.yang.common.RpcResult;
20
21
22 public class SalBundleServiceMock implements SalBundleService {
23
24     private final List<ControlBundleInput> controlBundleInput = new ArrayList<>();
25     private final List<AddBundleMessagesInput>  addBundleMessagesInput = new ArrayList<>();
26
27     @Override
28     public ListenableFuture<RpcResult<ControlBundleOutput>> controlBundle(ControlBundleInput input) {
29         getControlBundleInput().add(input);
30         return null;
31     }
32
33     @Override
34     public ListenableFuture<RpcResult<AddBundleMessagesOutput>> addBundleMessages(AddBundleMessagesInput input) {
35         getAddBundleMessagesInput().add(input);
36         return null;
37     }
38
39     public List<ControlBundleInput> getControlBundleInput() {
40         return controlBundleInput;
41     }
42
43     public List<AddBundleMessagesInput> getAddBundleMessagesInput() {
44         return addBundleMessagesInput;
45     }
46 }