@Test public void testDegree() {

    Graph g = new Graph(5);
    g.addAtom(mock(Atom.class));
    g.addAtom(mock(Atom.class));
    g.addAtom(mock(Atom.class));
    g.addEdge(new Edge(0, 1, Bond.IMPLICIT));
    g.addEdge(new Edge(1, 2, Bond.IMPLICIT));
    assertThat(g.degree(0), is(1));
    assertThat(g.degree(1), is(2));
}