diff --git a/src/test/java/net/lingala/zip4j/util/FileUtilsTestLinuxAndMac.java b/src/test/java/net/lingala/zip4j/util/FileUtilsTestLinuxAndMac.java index 035b9199..054084ae 100644 --- a/src/test/java/net/lingala/zip4j/util/FileUtilsTestLinuxAndMac.java +++ b/src/test/java/net/lingala/zip4j/util/FileUtilsTestLinuxAndMac.java @@ -148,14 +148,14 @@ private void verifyAllPermissionSet(Set permissions) { ); } - private PosixFileAttributeView mockPosixFileAttributeView(Path path, boolean isDirectory) - throws IOException { + private PosixFileAttributeView mockPosixFileAttributeView(Path path, boolean isDirectory) throws IOException { FileSystemProvider fileSystemProvider = mock(FileSystemProvider.class); FileSystem fileSystem = mock(FileSystem.class); PosixFileAttributeView posixFileAttributeView = mock(PosixFileAttributeView.class); when(path.getFileSystem()).thenReturn(fileSystem); - when(fileSystemProvider.getFileAttributeView(path, PosixFileAttributeView.class)) + when(fileSystemProvider.getFileAttributeView(path, PosixFileAttributeView.class)).thenReturn(posixFileAttributeView); + when(fileSystemProvider.getFileAttributeView(path, PosixFileAttributeView.class, LinkOption.NOFOLLOW_LINKS)) .thenReturn(posixFileAttributeView); when(path.getFileSystem().provider()).thenReturn(fileSystemProvider);