GlobalAntExecutor { public String getDeliverableFileName(final String fileName, final String translatorType) { final int lastDot = fileName.lastIndexOf(ConstantsCommon.STRING_DOT) ; return fileName.substring(0, lastDot) + ConstantsCommon.STRING_HYPHEN + translatorType + ConstantsCommon.STRING_DOT + ConstantsOutput.EXTENSION_ZIP ; } GlobalAntExecutor(final String parserType, final String translatorType); void launchAntExecutor(final String generatorBuilderPath,
                                  final String fileName,
                                  final String deliverableFileName,
                                  final String temporaryDir,
                                  final PrintStream errorStreamWrapper,
                                  final PrintStream outputStreamWrapper); String generateTemporaryOutputDirectory(final String generatorBuilderPath); String generateFullTemporaryDir(final String generatorBuilderPath, final String temporaryDir); void removeFullTemporaryDirectory(final String fullTemporaryDir); void validateFileExtension(final String fileName); String getDeliverableFileName(final String fileName, final String translatorType);  }
@Test public void getDeliverableFileNameTest() throws APIRestGeneratorException { final GlobalAntExecutor globalAntExecutor = new GlobalAntExecutor(ConstantsTest.PARSER_TYPE, ConstantsTest.TRANSLATOR_TYPE) ; globalAntExecutor.getDeliverableFileName(ConstantsTest.SPECIF_FILE_PATH, ConstantsTest.TRANSLATOR_TYPE) ; }