blob: 5cd31f0299933de4ea36918cba8492dfbe22ab16 [file] [log] [blame]
Prince Pereira3ff504c2016-08-30 14:23:43 +05301/*
2 * Copyright 2016 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.core;
17
18import com.google.common.testing.EqualsTester;
19import org.junit.Test;
20
21/**
22 * Test for GroupId.
23 */
24public class GroupIdTest {
25
26 /**
27 * Tests the equality of the instances.
28 */
29 @Test
30 public void testEquality() {
31 GroupId id1 = new GroupId((short) 1);
32 GroupId id2 = new GroupId((short) 1);
33 GroupId id3 = new GroupId((short) 2);
34
35 new EqualsTester()
36 .addEqualityGroup(id1, id2)
37 .addEqualityGroup(id3)
38 .testEquals();
39 }
40
41}