public static TemporaryFolder temp = new TemporaryFolder();
public static Caches createCacheOnTemp(TemporaryFolder temp) {
try {
BootstrapProperties bootstrapProps = new BootstrapProperties(ImmutableMap.of(CoreProperties.WORKING_DIRECTORY, temp.newFolder().getAbsolutePath()));
return new Caches(new TempFolderProvider().provide(bootstrapProps));
} catch (IOException e) {
throw new RuntimeException(e);
}
}