2 * Copyright (c) 2024 PANTHEON.tech, s.r.o. 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.yangtools.yang.common;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
12 import java.util.Optional;
13 import org.junit.jupiter.api.Test;
15 class QNameModuleTest {
17 void hashCodeValues() {
18 final var mod1 = QNameModule.create(XMLNamespace.of("foo"), Optional.empty());
19 assertEquals(3149755, mod1.hashCode());
20 final var mod2 = QNameModule.create(XMLNamespace.of("foo"), Revision.of("2024-01-26"));
21 assertEquals(-610191810, mod2.hashCode());