aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2024-11-29 21:47:08 +0200
committerDecebal Suiu <decebal.suiu@gmail.com>2024-11-29 21:47:08 +0200
commit215d64a73c707dd66cd9b56e44eca2398888299c (patch)
tree75e8819bb105bfdd22cf459dd184f6abd677fceb
parent9f596ae83c7c2466969636ac969ff0baed6c62e6 (diff)
downloadpf4j-215d64a73c707dd66cd9b56e44eca2398888299c.tar.gz
pf4j-215d64a73c707dd66cd9b56e44eca2398888299c.zip
Fix CompoundPluginRepositoryTest
-rw-r--r--pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java b/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java
index 7a3a82f..74a7b65 100644
--- a/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java
+++ b/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java
@@ -18,9 +18,11 @@ package org.pf4j;
import org.junit.jupiter.api.Test;
import java.nio.file.Path;
+import java.util.Collections;
import java.util.List;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -57,8 +59,8 @@ class CompoundPluginRepositoryTest {
PluginRepository mockRepository2 = mock(PluginRepository.class);
Path path1 = mock(Path.class);
Path path2 = mock(Path.class);
- when(mockRepository1.getPluginPaths()).thenReturn(List.of(path1));
- when(mockRepository2.getPluginPaths()).thenReturn(List.of(path2));
+ when(mockRepository1.getPluginPaths()).thenReturn(Collections.singletonList(path1));
+ when(mockRepository2.getPluginPaths()).thenReturn(Collections.singletonList(path2));
compoundRepository.add(mockRepository1);
compoundRepository.add(mockRepository2);
List<Path> paths = compoundRepository.getPluginPaths();