public static void appendLines(File file, String[] lines) throws IOException {
        if (file == null) {
            throw new IOException("File is null.");
        }
        writeLines(new FileOutputStream(file, true), lines);
    }
@Test
    void testAppendLines(@TempDir Path tmpDir) throws Exception {
        File file = tmpDir.getFileName().toAbsolutePath().toFile();
        IOUtils.appendLines(file, new String[] {"a", "b", "c"});
        String[] lines = IOUtils.readLines(file);
        assertThat(lines.length, equalTo(3));
        assertThat(lines[0], equalTo("a"));
        assertThat(lines[1], equalTo("b"));
        assertThat(lines[2], equalTo("c"));
        tmpDir.getFileName().toAbsolutePath().toFile().delete();
    }