2 * Copyright (c) 2014 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
9 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay.endpoint;
11 import java.util.Collection;
12 import java.util.HashMap;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.Endpoint;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3Key;
20 * Class for mocking up endpoints for unit tests
23 public class MockEndpointManager extends EndpointManager {
25 private Map<EndpointL3Key, EndpointL3> endpointsL3 = new HashMap<>();
27 public MockEndpointManager() {
28 super(null, null, null, null, null);
31 public void addEndpoint(Endpoint ep) {
32 processEndpoint(null, ep);
35 public void addL3Endpoint(EndpointL3 l3Ep) {
36 endpointsL3.put(l3Ep.getKey(), l3Ep);
40 protected Collection<EndpointL3> getL3Endpoints() {
41 return endpointsL3.values();