2 * Copyright (c) 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 org.opendaylight.groupbasedpolicy.base_endpoint;
10 import static org.mockito.Mockito.mock;
12 import org.junit.Assert;
13 import org.junit.Before;
14 import org.junit.Test;
15 import org.opendaylight.groupbasedpolicy.api.EndpointAugmentor;
17 public class EndpointAugmentorRegistryImplTest {
19 private EndpointAugmentorRegistryImpl epAugmentorRegistry;
20 private EndpointAugmentor epAugmentor;
24 epAugmentorRegistry = new EndpointAugmentorRegistryImpl();
25 epAugmentor = mock(EndpointAugmentor.class);
29 public void testRegisterUnregister() throws Exception {
30 epAugmentorRegistry.register(epAugmentor);
31 Assert.assertEquals(1, epAugmentorRegistry.getEndpointAugmentors().size());
33 epAugmentorRegistry.unregister(epAugmentor);
34 Assert.assertEquals(0, epAugmentorRegistry.getEndpointAugmentors().size());