### Question:
JexlNodeSet implements Set<JexlNode> { @Override public boolean addAll(Collection<? extends JexlNode> collection) { boolean modified = false; if (collection != null) { if (collection instanceof JexlNodeSet) { return directAddAll((JexlNodeSet) collection); } for (Object o : collection) { if (o instanceof JexlNode) { if (add((JexlNode) o)) { modified = true; } } } } return modified; } JexlNodeSet();  JexlNodeSet(boolean useSourceNodeForKeys); Collection<JexlNode> getNodes(); Set<String> getNodeKeys(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<JexlNode> iterator(); @Override Object[] toArray(); @Override T[] toArray(T[] ts); @Override boolean add(JexlNode node); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> collection); @Override boolean addAll(Collection<? extends JexlNode> collection); @Override boolean retainAll(Collection<?> collection); @Override boolean removeAll(Collection<?> collection); @Override void clear(); String buildKey(JexlNode node); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testAddAll() { JexlNode node1 = JexlNodeFactory.buildEQNode("FOO", "bar"); JexlNode node2 = JexlNodeFactory.buildEQNode("FOO2", "bar2"); JexlNode node3 = JexlNodeFactory.buildEQNode("FOO3", "bar3"); Collection<JexlNode> first = Lists.newArrayList(node1, node2); Collection<JexlNode> second = Lists.newArrayList(node2, node3); JexlNodeSet nodeSet = new JexlNodeSet(); assertTrue(nodeSet.addAll(first)); assertEquals(2, nodeSet.size()); assertTrue(nodeSet.contains(node1)); assertTrue(nodeSet.contains(node2)); assertFalse(nodeSet.contains(node3)); assertFalse(nodeSet.addAll(first)); assertEquals(2, nodeSet.size()); assertTrue(nodeSet.contains(node1)); assertTrue(nodeSet.contains(node2)); assertFalse(nodeSet.contains(node3)); assertTrue(nodeSet.addAll(second)); assertEquals(3, nodeSet.size()); assertTrue(nodeSet.contains(node1)); assertTrue(nodeSet.contains(node2)); assertTrue(nodeSet.contains(node3)); }