@Test
public void testAddListener() {

    UndirectedGraphListener listener1 = Mockito.mock(UndirectedGraphListener.class);
    UndirectedGraphListener listener2 = Mockito.mock(UndirectedGraphListener.class);
    graph.addListener(listener1);
    graph.addListener(listener2);
    Mockito.verify(listener1, Mockito.never()).graphChanged();
    Mockito.verify(listener2, Mockito.never()).graphChanged();
    graph.addVertex();
    Mockito.verify(listener1, Mockito.atLeastOnce()).graphChanged();
    Mockito.verify(listener2, Mockito.atLeastOnce()).graphChanged();
}