2 * Copyright (c) 2016 Brocade Communications 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
9 package test.mock.util;
11 import com.google.common.base.Optional;
12 import org.opendaylight.controller.md.sal.common.api.clustering.*;
14 import javax.annotation.Nonnull;
17 * Created by vishnoianil on 2/4/16.
19 public class EntityOwnershipServiceMock implements EntityOwnershipService {
21 public EntityOwnershipCandidateRegistration registerCandidate(@Nonnull Entity entity) throws CandidateAlreadyRegisteredException {
26 public EntityOwnershipListenerRegistration registerListener(@Nonnull String entityType, @Nonnull EntityOwnershipListener listener) {
31 public Optional<EntityOwnershipState> getOwnershipState(@Nonnull Entity forEntity) {
32 return Optional.of(new EntityOwnershipState(true, true));
36 public boolean isCandidateRegistered(@Nonnull Entity entity) {