### Question:
Preprocessor { public static File getTaggedVersion(File file, String tag, String extension) { if(Strings.isNullOrEmpty(tag)) { return file; } return new File(file.getParentFile(), file.getName().replaceAll(Pattern.quote(extension) + "$", String.format(".%s%s", tag, extension))); }  static long getTotalCsvSize(TableImportDescriptor descriptor); static boolean requiresProcessing(TableImportDescriptor descriptor); static File getTaggedVersion(File file, String tag, String extension); static void preprocess(TableImportDescriptor descriptor, ProgressBar totalProgress, ConqueryConfig config);  }### Answer:
@Test void getTaggedVersion() { assertThat(Preprocessor.getTaggedVersion(new File("file"), "tag", ".csv")).hasName("file"); assertThat(Preprocessor.getTaggedVersion(new File("file.csv"), "tag", ".csv")).hasName("file.tag.csv"); assertThat(Preprocessor.getTaggedVersion(new File("file.csv.csv"), "tag", ".csv")).hasName("file.csv.tag.csv"); }