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

elharo pushed a commit to branch assert
in repository 
https://gitbox.apache.org/repos/asf/maven-build-cache-extension.git

commit 328b9a5c4670de6f33e97a91bf9a998406195a0d
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Mon Jan 26 08:41:52 2026 -0500

    Break dependency on assert4j
---
 pom.xml                                            |  6 -----
 .../buildcache/LifecyclePhasesHelperTest.java      | 29 +++++++++++-----------
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0da6045..d3f9331 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,12 +271,6 @@ under the License.
       <version>${slf4jVersion}</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.assertj</groupId>
-      <artifactId>assertj-core</artifactId>
-      <version>3.27.6</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
diff --git 
a/src/test/java/org/apache/maven/buildcache/LifecyclePhasesHelperTest.java 
b/src/test/java/org/apache/maven/buildcache/LifecyclePhasesHelperTest.java
index 0b6a860..7e6c3fe 100644
--- a/src/test/java/org/apache/maven/buildcache/LifecyclePhasesHelperTest.java
+++ b/src/test/java/org/apache/maven/buildcache/LifecyclePhasesHelperTest.java
@@ -22,6 +22,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import com.google.common.collect.Lists;
 import org.apache.maven.buildcache.xml.Build;
 import org.apache.maven.execution.ExecutionEvent;
 import org.apache.maven.execution.MavenSession;
@@ -35,11 +36,10 @@
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
-import static java.util.Collections.emptyList;
 import static java.util.Collections.singletonList;
-import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertIterableEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assumptions.assumeTrue;
@@ -171,7 +171,8 @@ void getCleanSegment() {
         MojoExecution clean = mockedMojoExecution("clean");
         List<MojoExecution> cleanSegment = 
lifecyclePhasesHelper.getCleanSegment(
                 projectMock, Arrays.asList(clean, 
mockedMojoExecution("compile"), mockedMojoExecution("install")));
-        assertEquals(singletonList(clean), cleanSegment);
+
+        assertIterableEquals(singletonList(clean), cleanSegment);
     }
 
     /**
@@ -181,7 +182,7 @@ void getCleanSegment() {
     void getEmptyCleanSegment() {
         List<MojoExecution> cleanSegment = 
lifecyclePhasesHelper.getCleanSegment(
                 projectMock, Arrays.asList(mockedMojoExecution("compile"), 
mockedMojoExecution("install")));
-        assertEquals(emptyList(), cleanSegment);
+        assertTrue(cleanSegment.isEmpty());
     }
 
     /**
@@ -199,7 +200,7 @@ void getEmptyCleanSegmentIfForked() {
                         // null lifecycle phase is possible in forked 
executions
                         mockedMojoExecution(null), mockedMojoExecution(null)));
 
-        assertEquals(emptyList(), cleanSegment);
+        assertTrue(cleanSegment.isEmpty());
     }
 
     /**
@@ -216,7 +217,7 @@ void getCleanSegmentForkedAnyLifecyclePhase() {
                         // clean is overridden to "install" phase assuming 
forked execution
                         mockedMojoExecution("clean")));
 
-        assertEquals(emptyList(), cleanSegment);
+        assertTrue(cleanSegment.isEmpty());
     }
 
     @Test
@@ -230,7 +231,7 @@ void testCachedSegment() {
 
         List<MojoExecution> cachedSegment = 
lifecyclePhasesHelper.getCachedSegment(projectMock, mojoExecutions, build);
 
-        assertThat(cachedSegment).containsExactly(compile, test);
+        assertIterableEquals(Lists.newArrayList(compile, test), cachedSegment);
     }
 
     @Test
@@ -245,7 +246,7 @@ void testEmptyCachedSegment() {
 
         List<MojoExecution> cachedSegment = 
lifecyclePhasesHelper.getCachedSegment(projectMock, mojoExecutions, build);
 
-        assertThat(cachedSegment).isEmpty();
+        assertTrue(cachedSegment.isEmpty());
     }
 
     @Test
@@ -263,7 +264,7 @@ void testCachedSegmentForked() {
 
         List<MojoExecution> cachedSegment = 
lifecyclePhasesHelper.getCachedSegment(projectMock, mojoExecutions, build);
 
-        assertEquals(mojoExecutions, cachedSegment);
+        assertIterableEquals(mojoExecutions, cachedSegment);
     }
 
     @ParameterizedTest
@@ -279,7 +280,7 @@ void testAllInCachedSegment() {
 
         List<MojoExecution> cachedSegment = 
lifecyclePhasesHelper.getCachedSegment(projectMock, mojoExecutions, build);
 
-        assertEquals(mojoExecutions, cachedSegment);
+        assertIterableEquals(mojoExecutions, cachedSegment);
     }
 
     @Test
@@ -295,7 +296,7 @@ void testPostCachedSegment() {
         List<MojoExecution> notCachedSegment =
                 lifecyclePhasesHelper.getPostCachedSegment(projectMock, 
mojoExecutions, build);
 
-        assertThat(notCachedSegment).containsExactly(test, install);
+        assertIterableEquals(Lists.newArrayList(test, install), 
notCachedSegment);
     }
 
     @Test
@@ -311,7 +312,7 @@ void testAllPostCachedSegment() {
         List<MojoExecution> notCachedSegment =
                 lifecyclePhasesHelper.getPostCachedSegment(projectMock, 
mojoExecutions, build);
 
-        assertThat(notCachedSegment).isEqualTo(mojoExecutions);
+        assertIterableEquals(mojoExecutions, notCachedSegment);
     }
 
     @Test
@@ -330,7 +331,7 @@ void testPostCachedSegmentForked() {
         List<MojoExecution> cachedSegment =
                 lifecyclePhasesHelper.getPostCachedSegment(projectMock, 
mojoExecutions, build);
 
-        assertThat(cachedSegment).isEqualTo(mojoExecutions);
+        assertIterableEquals(mojoExecutions, cachedSegment);
     }
 
     @ParameterizedTest
@@ -347,7 +348,7 @@ void testEmptyPostCachedSegmentInclusive() {
         List<MojoExecution> notCachedSegment =
                 lifecyclePhasesHelper.getPostCachedSegment(projectMock, 
mojoExecutions, cachedBuild);
 
-        assertThat(notCachedSegment).isEmpty();
+        assertTrue(notCachedSegment.isEmpty());
     }
 
     private void publishForkedProjectEvent(MojoExecution origin) {

Reply via email to