Mark potentially-static methods as static
[genius.git] / mdsalutil / mdsalutil-api / src / test / java / org / opendaylight / genius / mdsalutil / matches / MatchInPortTest.java
1 /*
2  * Copyright (c) 2017 Red Hat, 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.genius.mdsalutil.matches;
9
10 import com.google.common.testing.EqualsTester;
11 import org.junit.Test;
12 import org.opendaylight.yangtools.yang.common.Uint64;
13
14 public class MatchInPortTest {
15
16     @Test
17     public void testEqualsAndHashCode() {
18         new EqualsTester()
19             .addEqualityGroup(newMatchInPort1(), newMatchInPort1())
20             .addEqualityGroup(newMatchInPort2(), newMatchInPort2())
21             .testEquals();
22     }
23
24     private static MatchInPort newMatchInPort1() {
25         return new MatchInPort(Uint64.ONE, 123);
26     }
27
28     private static MatchInPort newMatchInPort2() {
29         return new MatchInPort(Uint64.valueOf(10), 456);
30     }
31 }