public void testVertexWithEdges() throws IOException, InterruptedException {
Configuration conf = new Configuration();
TaskAttemptContext tac = mock(TaskAttemptContext.class);
when(tac.getConfiguration()).thenReturn(conf);
BasicVertex vertex = mock(BasicVertex.class);
when(vertex.getVertexId()).thenReturn(new Text("San Francisco"));
when(vertex.getVertexValue()).thenReturn(new DoubleWritable(0d));
when(vertex.getNumEdges()).thenReturn(2l);
ArrayList<Text> cities = new ArrayList<Text>();
Collections.addAll(cities, new Text("Los Angeles"), new Text("Phoenix"));
when(vertex.iterator()).thenReturn(cities.iterator());
mockEdgeValue(vertex, "Los Angeles", 347.16);
mockEdgeValue(vertex, "Phoenix", 652.48);
RecordWriter<Text,Text> tw = mock(RecordWriter.class);
AdjacencyListVertexWriter writer = new AdjacencyListVertexWriter(tw);