@Test
	public void testClearEdges()
	{
		final DCRGraph graph = new DCRGraph();
		final OrdinaryCluster parent = new OrdinaryCluster(graph, 1.0);
		parent.setGroundTruthIndex(0);
		final ClusterAdjacencyList list = new ClusterAdjacencyList(parent);

		final Node[] nodes = { new Node(), new Node(), new Node(), new Node(), new Node() };
		for (final Node node : nodes)
		{
			list.addNode(node);
		}
		final int[] edges =
		{
			0, 1,//
			1, 2,//
			1, 3,//
			1, 4,//
			2, 3,//
			3, 4,//
		};
		for (int e = 0; e < edges.length - 1; e += 2)
		{
			Assert.assertTrue(edges[e] < nodes.length && edges[e + 1] < nodes.length);
			list.addEdge(Edge.createEdge(new Pair<Node>(nodes[edges[e]], nodes[edges[e + 1]])));
			Assert.assertEquals((e + 2) / 2, list.getEdgeCount());
		}
		list.clearEdges();
		Assert.assertEquals(0, list.getEdgeCount());
		for (int e = 0; e < edges.length - 1; e += 2)
		{
			Assert.assertTrue(edges[e] < nodes.length && edges[e + 1] < nodes.length);
			list.addEdge(Edge.createEdge(new Pair<Node>(nodes[edges[e]], nodes[edges[e + 1]])));
			Assert.assertEquals((e + 2) / 2, list.getEdgeCount());
		}

	}