@@ -0,0 +1,2071 @@
+/*%0A * Grapht, an open source dependency injector.%0A * Copyright 2010-2012 Regents of the University of Minnesota and contributors%0A *%0A * This program is free software; you can redistribute it and/or modify%0A * it under the terms of the GNU Lesser General Public License as%0A * published by the Free Software Foundation; either version 2.1 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful, but WITHOUT%0A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more%0A * details.%0A *%0A * You should have received a copy of the GNU General Public License along with%0A * this program; if not, write to the Free Software Foundation, Inc., 51%0A * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%0A */%0Apackage org.grouplens.grapht.graph;%0A%0Aimport org.apache.commons.lang3.tuple.Pair;%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.Matchers.equalTo;%0Aimport static org.hamcrest.Matchers.hasSize;%0Aimport static org.hamcrest.Matchers.nullValue;%0Aimport static org.hamcrest.Matchers.contains;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A * @author %3Ca href=%22http://www.grouplens.org%22%3EGroupLens Research%3C/a%3E%0A */%0Apublic class DAGNodeBuilderTest %7B%0A    @Test%0A    public void testGetLabel() %7B%0A        DAGNodeBuilder%3CString,String%3E bld = DAGNode.newBuilder();%0A        assertThat(bld.getLabel(), nullValue());%0A        bld.setLabel(%22foo%22);%0A        assertThat(bld.getLabel(), equalTo(%22foo%22));%0A    %7D%0A%0A    @Test%0A    public void testGetEdges() %7B%0A        DAGNodeBuilder%3CString,String%3E bld = DAGNode.newBuilder(%22foo%22);%0A        assertThat(bld.getEdges(), hasSize(0));%0A        DAGNode%3CString,String%3E nbr = DAGNode.singleton(%22bar%22);%0A        bld.addEdge(nbr, %22piper%22);%0A        assertThat(bld.getEdges(),%0A                   contains(Pair.of(nbr, %22piper%22)));%0A        DAGNode%3CString,String%3E node = bld.build();%0A        assertThat(node.getLabel(), equalTo(%22foo%22));%0A        assertThat(node.getAdjacentNodes(), contains(nbr));%0A    %7D%0A%7D%0A

Add tests for DAG node builder accessors