}
ByteArrayInputStream stream = new ByteArrayInputStream(buf.toString().getBytes());
OutputStreamWriter writer = new OutputStreamWriter(getConfiguration(), testDefaultPath, Codecs.GZIP.getCodecInfo());
ChainedFileNamingStrategy fileNamingStrategy = new ChainedFileNamingStrategy();
fileNamingStrategy.register(new StaticFileNamingStrategy("data"));
fileNamingStrategy.register(new CodecFileNamingStrategy());
writer.setFileNamingStrategy(fileNamingStrategy);
doWithInputStream(stream, writer);