From b1d0cb8e196b6f292f331ed9a25508e3b119eb32 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 13 May 2025 11:51:41 +0200 Subject: [PATCH] Polishing. Add test. See: #2477 Original pull request: #2478 --- .../RepositoryRelProviderUnitTests.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 spring-data-rest-core/src/test/java/org/springframework/data/rest/core/support/RepositoryRelProviderUnitTests.java diff --git a/spring-data-rest-core/src/test/java/org/springframework/data/rest/core/support/RepositoryRelProviderUnitTests.java b/spring-data-rest-core/src/test/java/org/springframework/data/rest/core/support/RepositoryRelProviderUnitTests.java new file mode 100644 index 000000000..9d778c7b0 --- /dev/null +++ b/spring-data-rest-core/src/test/java/org/springframework/data/rest/core/support/RepositoryRelProviderUnitTests.java @@ -0,0 +1,39 @@ +/* + * Copyright 2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.rest.core.support; + +import static org.assertj.core.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +import org.springframework.core.annotation.OrderUtils; + +/** + * Unit tests for {@link RepositoryRelProvider}. + * + * @author Mark Paluch + */ +class RepositoryRelProviderUnitTests { + + @Test // GH-2477 + void shouldReportOrder() { + + Integer order = OrderUtils.getOrder(RepositoryRelProvider.class); + + assertThat(order).isEqualTo(Integer.MAX_VALUE - 10); + } + +}