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 com.google.common.base.Optional;
11 import org.opendaylight.controller.md.sal.common.api.clustering.*;
13 import javax.annotation.Nonnull;
16 * Created by vishnoianil on 1/13/16.
18 public class EntityOwnershipServiceMock implements EntityOwnershipService {
20 public EntityOwnershipCandidateRegistration registerCandidate(@Nonnull Entity entity) throws CandidateAlreadyRegisteredException {
25 public EntityOwnershipListenerRegistration registerListener(@Nonnull String entityType, @Nonnull EntityOwnershipListener listener) {
30 public Optional<EntityOwnershipState> getOwnershipState(@Nonnull Entity forEntity) {
31 return Optional.of(new EntityOwnershipState(true,true));
35 public boolean isCandidateRegistered(@Nonnull Entity entity) {