File (@NotNull String target, @NotNull String link, boolean shouldExist) { File linkFile = getFullLinkPath(link); try { Files.createSymbolicLink(linkFile.toPath(), Path.of(target)); } catch (IOException e) { throw new UncheckedIOException(e); } assertEquals("target=" + target + ", link=" + linkFile, shouldExist, linkFile.exists()); return linkFile; }