Add missing license headers
[groupbasedpolicy.git] / groupbasedpolicy / src / test / java / org / opendaylight / groupbasedpolicy / base_endpoint / EndpointAugmentorRegistryImplTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.groupbasedpolicy.base_endpoint;
9
10 import static org.mockito.Mockito.mock;
11
12 import org.junit.Assert;
13 import org.junit.Before;
14 import org.junit.Test;
15 import org.opendaylight.groupbasedpolicy.api.EndpointAugmentor;
16
17 public class EndpointAugmentorRegistryImplTest {
18
19     private EndpointAugmentorRegistryImpl epAugmentorRegistry;
20     private EndpointAugmentor epAugmentor;
21
22     @Before
23     public void init() {
24         epAugmentorRegistry = new EndpointAugmentorRegistryImpl();
25         epAugmentor = mock(EndpointAugmentor.class);
26     }
27
28     @Test
29     public void testRegisterUnregister() throws Exception {
30         epAugmentorRegistry.register(epAugmentor);
31         Assert.assertEquals(1, epAugmentorRegistry.getEndpointAugmentors().size());
32
33         epAugmentorRegistry.unregister(epAugmentor);
34         Assert.assertEquals(0, epAugmentorRegistry.getEndpointAugmentors().size());
35     }
36 }