1) Implement a test case for a class that manipulates graphs: package graph; import junit.framework.TestCase; public class TestGraph extends TestCase { public static void main(String[] args) { junit.textui.TestRunner.main(new String[] { "graph.TestGraph" }); } public TestGraph(final String name) { super(name); } public final void testAddNode() throws Exception { Graph g = new GraphImpl(); g.add("abelha"); assertEquals(g.contains("abelha"), true); } public final void testAddLink() throws Exception { Graph g = new GraphImpl(); g.add("abelha"); g.add("vespa"); g.link("abelha", "vespa"); assertEquals(g.contains("abelha"), true); assertEquals(g.contains("vespa"), true); assertEquals(g.neighbors("abelha", "vespa"), true); assertEquals(g.neighbors("vespa", "abelha"), true); } } 2) What is junit? 2.1) How does it work? 3) What about the class that passes the tests? package graph; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; public class GraphImpl implements Graph { private Map> nodes; public GraphImpl() { nodes = new HashMap>(); } public void add(T e) { if (!nodes.containsKey(e)) { nodes.put(e, new LinkedList()); } } public boolean contains(T e) { return nodes.containsKey(e); } public void link(T e1, T e2) { List l1 = nodes.get(e1); l1.add(e2); List l2 = nodes.get(e2); l2.add(e1); } public boolean neighbors(T e1, T e2) { List l1 = nodes.get(e1); List l2 = nodes.get(e2); return l1.contains(e2) && l2.contains(e1); } }