public void testAddRemoveEdges() {
Map<IntWritable, DoubleWritable> edgeMap = Maps.newHashMap();
vertex.initialize(null, null, edgeMap, null);
assertEquals(vertex.getNumOutEdges(), 0);
assertTrue(vertex.addEdge(new IntWritable(2),
new DoubleWritable(2.0)));
assertEquals(vertex.getNumOutEdges(), 1);
assertEquals(vertex.getEdgeValue(new IntWritable(2)),
new DoubleWritable(2.0));
assertTrue(vertex.addEdge(new IntWritable(4),
new DoubleWritable(4.0)));
assertTrue(vertex.addEdge(new IntWritable(3),
new DoubleWritable(3.0)));
assertTrue(vertex.addEdge(new IntWritable(1),
new DoubleWritable(1.0)));
assertEquals(vertex.getNumOutEdges(), 4);
assertNull(vertex.getEdgeValue(new IntWritable(5)));
assertNull(vertex.getEdgeValue(new IntWritable(0)));
int i = 1;
for (IntWritable edgeDestId : vertex) {