diff --git a/src/test/java/org/jabref/logic/util/io/FileUtilTest.java b/src/test/java/org/jabref/logic/util/io/FileUtilTest.java index 3c82fa8453e..ce6f126c045 100644 --- a/src/test/java/org/jabref/logic/util/io/FileUtilTest.java +++ b/src/test/java/org/jabref/logic/util/io/FileUtilTest.java @@ -387,4 +387,18 @@ void testIsNotBibFile() throws IOException { Path bibFile = Files.createFile(rootDir.resolve("test.pdf")); assertFalse(FileUtil.isBibFile(bibFile)); } + + @Test + void testFindinPath() { + Optional resultPath1 = FileUtil.find("existingTestFile.txt", rootDir); + assertEquals(resultPath1.get().toString(), existingTestFile.toString()); + } + + @Test + void testFindinListofPath() { + List paths = List.of(existingTestFile, otherExistingTestFile, rootDir); + List resultPaths = List.of(existingTestFile, existingTestFile); + List result = FileUtil.find("existingTestFile.txt", paths); + assertEquals(resultPaths, result); + } }