public static String getCanonicalPath(File workDir) {
        try {
            return workDir.getCanonicalPath();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
@Test
    void shouldReturnCanonicalPath() throws IOException {
        assertThat(FileUtil.getCanonicalPath(folder)).isEqualTo(folder.getCanonicalPath());
        File spyFile = spy(new File("/xyz/non-existent-file"));
        IOException canonicalPathException = new IOException("Failed to build the canonical path");
        doThrow(canonicalPathException).when(spyFile).getCanonicalPath();
        assertThatThrownBy(() -> FileUtil.getCanonicalPath(spyFile))
                .isExactlyInstanceOf(RuntimeException.class)
                .hasCause(canonicalPathException);
    }