2 * Copyright (c) 2014, 2016 Cisco Systems, Inc. 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 test.mock.util;
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;
19 import java.util.ArrayList;
20 import java.util.List;
21 import java.util.concurrent.Future;
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<>();
29 public Future<RpcResult<AddGroupOutput>> addGroup(AddGroupInput input) {
30 addGroupCalls.add(input);
35 public Future<RpcResult<RemoveGroupOutput>> removeGroup(RemoveGroupInput input) {
36 removeGroupCalls.add(input);
41 public Future<RpcResult<UpdateGroupOutput>> updateGroup(UpdateGroupInput input) {
42 updateGroupCalls.add(input);
46 public List<AddGroupInput> getAddGroupCalls() {
50 public List<RemoveGroupInput> getRemoveGroupCalls() {
51 return removeGroupCalls;
54 public List<UpdateGroupInput> getUpdateGroupCalls() {
55 return updateGroupCalls;