edges.initialize(3);
edges.add(EdgeFactory.create(new IntWritable(2), new DoubleWritable(22)));
edges.add(EdgeFactory.create(new IntWritable(3), new DoubleWritable(33)));
edges.add(EdgeFactory.create(new IntWritable(4), new DoubleWritable(44)));
vertex.initialize(new IntWritable(1), new FloatWritable(1), edges);
GiraphTransferRegulator gtr =
new GiraphTransferRegulator(job.getConfiguration());
PartitionOwner owner = mock(PartitionOwner.class);
when(owner.getPartitionId()).thenReturn(57);
assertFalse(gtr.transferThisPartition(owner));
gtr.incrementCounters(owner, vertex);
assertTrue(gtr.transferThisPartition(owner));
}