void (@NotNull File sourceFile) { try { String sourceName = sourceFile.getPath(); File realFile = sourceFile.getCanonicalFile(); String realFileName = realFile.getPath(); if (!sourceName.equals(realFileName) && sourceName.equalsIgnoreCase(realFileName)) { fail("Please correct case-sensitivity of path to prevent test failure on case-sensitive file systems:\n" + " path " + sourceFile.getPath() + "\n" + "real path " + realFile.getPath()); } } catch (IOException e) { throw new UncheckedIOException("sourceFile="+sourceFile, e); } }