writer.setFileNamingStrategy(fileNamingStrategy);
writer.setInWritingSuffix(".tmp");
writer.afterPropertiesSet();
TestUtils.writeData(writer, dataArray);
TextFileReader reader1 = new TextFileReader(getConfiguration(), new Path(testDefaultPath, "data-0.gzip"), Codecs.GZIP.getCodecInfo());
List<String> splitData1 = TestUtils.readData(reader1);
TextFileReader reader2 = new TextFileReader(getConfiguration(), new Path(testDefaultPath, "data-1.gzip"), Codecs.GZIP.getCodecInfo());
List<String> splitData2 = TestUtils.readData(reader2);
TextFileReader reader3 = new TextFileReader(getConfiguration(), new Path(testDefaultPath, "data-2.gzip"), Codecs.GZIP.getCodecInfo());
List<String> splitData3 = TestUtils.readData(reader3);
assertThat(splitData1.size() + splitData2.size() + splitData3.size(), is(3));
}