Edge edge12 = graphModel.factory().newEdge(node1, node2, false);
Edge edge13 = graphModel.factory().newEdge(node1, node3, false);
Edge edge34 = graphModel.factory().newEdge(node3, node4, false);
Edge edge24 = graphModel.factory().newEdge(node2, node4, false);
Edge edge56 = graphModel.factory().newEdge(node5, node6, false);
Edge edge67 = graphModel.factory().newEdge(node6, node7, false);
Edge edge78 = graphModel.factory().newEdge(node7, node8, false);
Edge edge85 = graphModel.factory().newEdge(node8, node5, false);
Edge edge45 = graphModel.factory().newEdge(node4, node5, false);
undirectedGraph.addEdge(edge12);
undirectedGraph.addEdge(edge13);