DependencyResolver { public void addRequired(T object, Iterable<T> dependencies) { allObjects.add(object); Edge<T> edge = null; for (Edge<T> e : edges) { if (object == e.object) { edge = e; break; } } if (edge == null) { edge = new Edge<T>(object); edges.add(edge); } if (dependencies != null) { for (T dependency : dependencies) { allDependencies.add(dependency); edge.dependencies.add(dependency); } } }  void addRequired(T object, Iterable<T> dependencies); void addRequired(T object, T... dependencies); List<T> resolve();  }
@Ignore @Test (expected=IllegalStateException.class) public void resolve_null_depender_2() { resolver.addRequired((String)null, obj2); }
@Ignore @Test (expected=IllegalStateException.class) public void resolve_null_dependant_2() { resolver.addRequired(obj1, (String)null); }