diff --git a/uberfire-io/src/test/java/org/uberfire/io/CommonIOExceptionsServiceDotFileTest.java b/uberfire-io/src/test/java/org/uberfire/io/CommonIOExceptionsServiceDotFileTest.java index de01e1b278..f7bc8ee3ea 100644 --- a/uberfire-io/src/test/java/org/uberfire/io/CommonIOExceptionsServiceDotFileTest.java +++ b/uberfire-io/src/test/java/org/uberfire/io/CommonIOExceptionsServiceDotFileTest.java @@ -82,7 +82,7 @@ public void createDirectoryFileAlreadyExistsException() { ioService().createDirectory(path); } - @Test(expected = FileAlreadyExistsException.class) + @Test(expected = org.uberfire.java.nio.IOException.class) public void createDirectoriesFileAlreadyExistsException() { final Path path = getDirectoryPath().resolveSibling("otherDir").resolve("innerDir"); diff --git a/uberfire-nio2-backport/uberfire-nio2-impls/uberfire-nio2-fs/src/test/java/org/uberfire/java/nio/fs/file/SimpleFileSystemProviderTest.java b/uberfire-nio2-backport/uberfire-nio2-impls/uberfire-nio2-fs/src/test/java/org/uberfire/java/nio/fs/file/SimpleFileSystemProviderTest.java index 6b00f919ce..629f3384be 100644 --- a/uberfire-nio2-backport/uberfire-nio2-impls/uberfire-nio2-fs/src/test/java/org/uberfire/java/nio/fs/file/SimpleFileSystemProviderTest.java +++ b/uberfire-nio2-backport/uberfire-nio2-impls/uberfire-nio2-fs/src/test/java/org/uberfire/java/nio/fs/file/SimpleFileSystemProviderTest.java @@ -594,7 +594,7 @@ public void checkDeleteIfExists() throws IOException { assertThat(path.toFile()).doesNotExist(); } - @Test + @Test(expected = org.uberfire.java.nio.IOException.class) public void checkDeleteIfExistsNonExistent() { final SimpleFileSystemProvider fsProvider = new SimpleFileSystemProvider();