GlobalAntExecutor { public void removeFullTemporaryDirectory(final String fullTemporaryDir) throws APIRestGeneratorException { try { if (fullTemporaryDir != null) { FileUtils.deleteDirectory(new File(fullTemporaryDir)) ; } } catch (IOException ioException) { final String errorString = "IOException while removing the temporary directory: " + fullTemporaryDir ; GlobalAntExecutor.LOGGER.error(errorString, ioException) ; throw new APIRestGeneratorException(errorString) ; } } 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 removeFullTemporaryDirectoryTest() throws APIRestGeneratorException { final GlobalAntExecutor globalAntExecutor = new GlobalAntExecutor(ConstantsTest.PARSER_TYPE, ConstantsTest.TRANSLATOR_TYPE) ; globalAntExecutor.removeFullTemporaryDirectory(ConstantsTest.FULL_TEMPORARY_DIR) ; }