diff --git a/pom.xml b/pom.xml
index 88fbe5d..23b1033 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,8 +143,8 @@
maven-compiler-plugin
${compiler.version}
-
- 17
+
+ 8
diff --git a/urm-maven/src/test/java/com/iluwatar/urm/DomainMapperMojoTest.java b/urm-maven/src/test/java/com/iluwatar/urm/DomainMapperMojoTest.java
index b1ced9b..a49634a 100644
--- a/urm-maven/src/test/java/com/iluwatar/urm/DomainMapperMojoTest.java
+++ b/urm-maven/src/test/java/com/iluwatar/urm/DomainMapperMojoTest.java
@@ -62,8 +62,8 @@ public void testPlantUmlExecute() throws MojoExecutionException,
mojo.execute();
assertTrue(Files.exists(pumlPath));
List strings = Files.readAllLines(pumlPath);
- assertEquals(1, strings.stream().filter(s -> s.contains("package com.iluwatar.urm.testdomain")).toList().size());
- assertEquals(2, strings.stream().filter(s -> s.contains("TestPojo")).toList().size());
+ assertEquals(1, strings.stream().filter(s -> s.contains("package com.iluwatar.urm.testdomain")).count());
+ assertEquals(2, strings.stream().filter(s -> s.contains("TestPojo")).count());
} finally {
Files.delete(pumlPath);
}