when(vertex.iterator()).thenReturn(new ArrayList<Text>().iterator());
RecordWriter<Text, Text> tw = mock(RecordWriter.class);
IdWithValueVertexWriter writer = new IdWithValueVertexWriter(tw);
writer.initialize(tac);
writer.writeVertex(vertex);
verify(tw).write(expected, null);
verify(vertex, times(0)).iterator();
verify(vertex, times(0)).getEdgeValue(Matchers.<WritableComparable>any());
}