Reuse IOExceptionList.
MODIFY
src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
@@ -111,7 +111,8 @@ public void testThrowsOnCannotDeleteFile() throws Exception {
FileUtils.cleanDirectory(top);
fail("expected IOException");
} catch (final IOException e) {
- assertEquals("Unable to delete file: " + file.getAbsolutePath(), e.getMessage());
+ final IOExceptionList list = (IOExceptionList) e;
+ assertEquals("Unable to delete file: " + file.getAbsolutePath(), list.getCause(0).getMessage());
} finally {
chmod(top, 755, false);
}

Reuse IOExceptionList.