Skip to content

Commit eb78338

Browse files
committed
fix test
1 parent a01a2b2 commit eb78338

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/cryptomator/cryptofs/FileNameDecryptorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import java.io.IOException;
1818
import java.nio.file.FileSystemException;
19+
import java.nio.file.NoSuchFileException;
1920
import java.nio.file.Path;
2021

2122
import static org.mockito.ArgumentMatchers.any;
@@ -76,7 +77,7 @@ public void validatePath() throws IOException {
7677
@DisplayName("If the dirId backup file does not exists, throw UnsupportedOperationException")
7778
public void notExistingDirIdFile() throws IOException {
7879
var ciphertextNode = tmpPath.resolve("toDecrypt.c9r");
79-
when(dirIdBackup.read(ciphertextNode)).thenThrow(UnsupportedOperationException.class);
80+
when(dirIdBackup.read(ciphertextNode)).thenThrow(NoSuchFileException.class);
8081

8182
Assertions.assertThrows(UnsupportedOperationException.class, () -> testObjSpy.decryptFilenameInternal(ciphertextNode));
8283
}

0 commit comments

Comments
 (0)