}
}
public void testRemoveNode() {
int cliqueSize = 5;
Graph g = GraphLib.getClique(cliqueSize);
Edge[] edges = new Edge[4];
Node rem = (Node)g.nodes().next();
Iterator it = rem.edges();
for ( int i=0; it.hasNext(); ++i ) {
edges[i] = (Edge)it.next();
}
assertEquals(true, g.removeNode(rem));
assertEquals(false, rem.isValid());
Iterator nodes = g.nodes();
while ( nodes.hasNext() ) {
assertEquals(cliqueSize-2, ((Node)nodes.next()).getDegree());
}
for ( int i=0; i<edges.length; ++i ) {
assertEquals(false, edges[i].isValid());