Add missing license headers
[openflowplugin.git] / applications / forwardingrules-manager / src / test / java / test / mock / util / SalGroupServiceMock.java
1 /*
2  * Copyright (c) 2014, 2016 Cisco Systems, Inc. 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 package test.mock.util;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInput;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupOutput;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupInput;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupOutput;
17 import org.opendaylight.yangtools.yang.common.RpcResult;
18
19 import java.util.ArrayList;
20 import java.util.List;
21 import java.util.concurrent.Future;
22
23 public class SalGroupServiceMock implements SalGroupService {
24     private List<AddGroupInput> addGroupCalls = new ArrayList<>();
25     private List<RemoveGroupInput> removeGroupCalls = new ArrayList<>();
26     private List<UpdateGroupInput> updateGroupCalls = new ArrayList<>();
27
28     @Override
29     public Future<RpcResult<AddGroupOutput>> addGroup(AddGroupInput input) {
30         addGroupCalls.add(input);
31         return null;
32     }
33
34     @Override
35     public Future<RpcResult<RemoveGroupOutput>> removeGroup(RemoveGroupInput input) {
36         removeGroupCalls.add(input);
37         return null;
38     }
39
40     @Override
41     public Future<RpcResult<UpdateGroupOutput>> updateGroup(UpdateGroupInput input) {
42         updateGroupCalls.add(input);
43         return null;
44     }
45
46     public List<AddGroupInput> getAddGroupCalls() {
47         return addGroupCalls;
48     }
49
50     public List<RemoveGroupInput> getRemoveGroupCalls() {
51         return removeGroupCalls;
52     }
53
54     public List<UpdateGroupInput> getUpdateGroupCalls() {
55         return updateGroupCalls;
56     }
57 }