public String write(final String rendered, final String inputFileName, final File outputPath) throws IOException {

        Path writeOutputPath = outputFile(inputFileName, outputPath.getPath());

        Files.writeString(writeOutputPath, rendered);

        return writeOutputPath.toString();
    }
@Test
    public void testWrite() throws IOException {

        Path path = Paths.get(temporaryDirectory.getPath());

        String content = "x y z";

        String outputPathStr = fileUtil.write(content, FOOBAR, path.toFile());
        Path outputPath = Paths.get((outputPathStr));

        String result = Files.readString(outputPath);

        assertAll(
                () -> assertTrue(Files.exists(outputPath)),
                () -> assertTrue(result.length() > 0),
                () -> assertTrue(result.startsWith("x")),
                () -> assertTrue(result.endsWith("z")));
    }