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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


The following commit(s) were added to refs/heads/master by this push:
     new 786ab2344 Add AbstractMapTest.testMapComputeIfAbsent()
786ab2344 is described below

commit 786ab2344f741f636d6894c90223ffca04a7811a
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Sep 25 13:35:19 2024 -0400

    Add AbstractMapTest.testMapComputeIfAbsent()
---
 .../org/apache/commons/collections4/map/LazyMapTest.java   | 14 +++++++++-----
 .../apache/commons/collections4/map/LazySortedMapTest.java |  5 +++++
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java 
b/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java
index 344131938..b04fe89ed 100644
--- a/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.collections4.map;
 
-import static org.apache.commons.collections4.map.LazyMap.lazyMap;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertSame;
@@ -50,9 +49,14 @@ public class LazyMapTest<K, V> extends 
AbstractIterableMapTest<K, V> {
         return "4";
     }
 
+    @Override
+    protected boolean isLazyMapTest() {
+        return true;
+    }
+
     @Override
     public LazyMap<K, V> makeObject() {
-        return lazyMap(new HashMap<>(), FactoryUtils.<V>nullFactory());
+        return LazyMap.lazyMap(new HashMap<>(), FactoryUtils.<V>nullFactory());
     }
 
     @Test
@@ -63,7 +67,7 @@ public class LazyMapTest<K, V> extends 
AbstractIterableMapTest<K, V> {
 
     @Test
     public void testMapGetWithFactory() {
-        Map<Integer, Number> map = lazyMap(new HashMap<>(), oneFactory);
+        Map<Integer, Number> map = LazyMap.lazyMap(new HashMap<>(), 
oneFactory);
         assertEquals(0, map.size());
         final Number i1 = map.get("Five");
         assertEquals(1, i1);
@@ -73,7 +77,7 @@ public class LazyMapTest<K, V> extends 
AbstractIterableMapTest<K, V> {
         assertEquals(1, map.size());
         assertSame(i1, i2);
 
-        map = lazyMap(new HashMap<>(), FactoryUtils.<Long>nullFactory());
+        map = LazyMap.lazyMap(new HashMap<>(), 
FactoryUtils.<Long>nullFactory());
         final Object o = map.get("Five");
         assertNull(o);
         assertEquals(1, map.size());
@@ -82,7 +86,7 @@ public class LazyMapTest<K, V> extends 
AbstractIterableMapTest<K, V> {
     @Test
     public void testMapGetWithTransformer() {
         final Transformer<Number, Integer> intConverter = Number::intValue;
-        final Map<Long, Number> map = lazyMap(new HashMap<>(), intConverter);
+        final Map<Long, Number> map = LazyMap.lazyMap(new HashMap<>(), 
intConverter);
         assertEquals(0, map.size());
         final Number i1 = map.get(123L);
         assertEquals(123, i1);
diff --git 
a/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java 
b/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
index 7d341bdba..f718a4c85 100644
--- a/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
@@ -73,6 +73,11 @@ public class LazySortedMapTest<K, V> extends 
AbstractSortedMapTest<K, V> {
         return false;
     }
 
+    @Override
+    protected boolean isLazyMapTest() {
+        return true;
+    }
+
     @Override
     public SortedMap<K, V> makeObject() {
         return lazySortedMap(new TreeMap<>(), FactoryUtils.<V>nullFactory());

Reply via email to