FileStatus[] statuses = fs.listStatus(output);
assertEquals(1, statuses.length);
Path filePath = statuses[0].getPath();
SequenceFile.Reader reader = new SequenceFile.Reader(fs, filePath, configuration);
Text key = reader.getKeyClass().asSubclass(Text.class).newInstance();
StringTuple value = reader.getValueClass().asSubclass(StringTuple.class).newInstance();
reader.next(key, value);
assertEquals(documentId1, key.toString());
assertEquals(Arrays.asList("test", "document", "processor"), value.getEntries());
reader.next(key, value);
assertEquals(documentId2, key.toString());
assertEquals(Arrays.asList("another", "one"), value.getEntries());
}