You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2026/02/16 09:58:35 UTC

(sling-org-apache-sling-models-caconfig) branch feature/SLING-13118-update-test-deps created (now f497f5e)

This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a change to branch feature/SLING-13118-update-test-deps
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-caconfig.git


      at f497f5e  SLING-13118 update test dependencies, eliminate usage of guava in test code

This branch includes the following new commits:

     new f497f5e  SLING-13118 update test dependencies, eliminate usage of guava in test code

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(sling-org-apache-sling-models-caconfig) 01/01: SLING-13118 update test dependencies, eliminate usage of guava in test code

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch feature/SLING-13118-update-test-deps
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-caconfig.git

commit f497f5e6bb011f9a27d38cacd600086398e3609d
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Mon Feb 16 10:58:25 2026 +0100

    SLING-13118 update test dependencies, eliminate usage of guava in test code
---
 pom.xml                                                  |  2 +-
 .../injectors/ContextAwareConfigurationInjectorTest.java | 16 +++++++---------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8f7ba3f..6c4495a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,7 +130,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock.junit5</artifactId>
-            <version>3.5.6</version>
+            <version>3.6.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/src/test/java/org/apache/sling/models/caconfig/impl/injectors/ContextAwareConfigurationInjectorTest.java b/src/test/java/org/apache/sling/models/caconfig/impl/injectors/ContextAwareConfigurationInjectorTest.java
index 4cc148e..58dba05 100644
--- a/src/test/java/org/apache/sling/models/caconfig/impl/injectors/ContextAwareConfigurationInjectorTest.java
+++ b/src/test/java/org/apache/sling/models/caconfig/impl/injectors/ContextAwareConfigurationInjectorTest.java
@@ -18,12 +18,12 @@
  */
 package org.apache.sling.models.caconfig.impl.injectors;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 import java.util.function.Function;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.Strings;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.adapter.Adaptable;
 import org.apache.sling.api.resource.Resource;
@@ -82,9 +82,7 @@ class ContextAwareConfigurationInjectorTest {
                 context,
                 "/content/region/site",
                 ListConfig.class,
-                ImmutableList.of(
-                        ImmutableMap.<String, Object>of("stringParam", "item1"),
-                        ImmutableMap.<String, Object>of("stringParam", "item2")));
+                List.of(Map.of("stringParam", "item1"), Map.of("stringParam", "item2")));
     }
 
     @Test
@@ -105,7 +103,7 @@ class ContextAwareConfigurationInjectorTest {
                     @Override
                     @SuppressWarnings("null")
                     public @Nullable Resource detectResource(@NotNull SlingHttpServletRequest request) {
-                        if (StringUtils.equals(request.getResource().getPath(), otherCurrentResource.getPath())) {
+                        if (Strings.CS.equals(request.getResource().getPath(), otherCurrentResource.getPath())) {
                             return context.resourceResolver().getResource("/content/region/site/en");
                         }
                         return null;
@@ -209,8 +207,8 @@ class ContextAwareConfigurationInjectorTest {
         ListConfigGetter<T> model = adaptable.adaptTo(modelClass);
         assertNotNull(model);
         assertListValues(model.getConfigList(), extractor);
-        assertListValues(ImmutableList.copyOf(model.getConfigCollection()), extractor);
-        assertListValues(ImmutableList.copyOf(model.getConfigArray()), extractor);
+        assertListValues(List.copyOf(model.getConfigCollection()), extractor);
+        assertListValues(Arrays.asList(model.getConfigArray()), extractor);
     }
 
     private <T> void assertListValues(List<T> configList, Function<T, String> extractor) {