private static <T> T withTempDirectory(ThrowingFunction<Path, T> f) throws Exception {
        Path directory = Files.createTempDirectory("application");
        try {
            return f.apply(directory);
        } finally {
            IOUtils.recursiveDeleteDir(directory.toFile());
        }
    }
Creates a local application from vespa-services fragments.

@author Tony Vaagenes
@author ollivir
standalone-container/src/test/java/com/yahoo/container/standalone/StandaloneContainer.java