public static String getFileName(String source) {
        return source.contains(File.separator) ?
                source.substring(source.lastIndexOf(File.separatorChar) + 1) : source;
    }
@Test
    void getFileName() {
        String fileName = "file_name.txt";
        String source = fileName;
        assertThat(FileNameUtils.getFileName(source)).isEqualTo(fileName);
        source = File.separator + "dir" + File.separator + fileName;
        assertThat(FileNameUtils.getFileName(source)).isEqualTo(fileName);
    }