assertEquals(0, partition.getEdgeCount());
assertEquals(7, partition.getVertexCount());
UnsafeByteArrayOutputStream outputStream = new
UnsafeByteArrayOutputStream();
partition.write(outputStream);
UnsafeByteArrayInputStream inputStream = new UnsafeByteArrayInputStream(
outputStream.getByteArray(), 0, outputStream.getPos());
Partition<IntWritable, IntWritable, NullWritable,
IntWritable> deserializatedPartition = conf.createPartition(-1,
context);
deserializatedPartition.readFields(inputStream);