### Question:
JexlNodeSet implements Set<JexlNode> { private boolean directAddAll(JexlNodeSet other) { boolean modified = false; Set<Map.Entry<String,JexlNode>> otherEntries = other.nodeMap.entrySet(); for (Map.Entry<String,JexlNode> entry : otherEntries) { if (directAdd(entry.getKey(), entry.getValue())) { 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 testDirectAddAll() { JexlNode node1 = JexlNodeFactory.buildEQNode("FOO", "bar"); JexlNode node2 = JexlNodeFactory.buildEQNode("FOO2", "bar2"); JexlNodeSet nodeSet = new JexlNodeSet(); nodeSet.add(node1); nodeSet.add(node2); JexlNode node3 = JexlNodeFactory.buildEQNode("FOO3", "bar3"); JexlNode node4 = JexlNodeFactory.buildEQNode("FOO4", "bar4"); JexlNodeSet otherSet = new JexlNodeSet(); otherSet.add(node3); otherSet.add(node4); assertEquals(2, nodeSet.size()); assertEquals(2, otherSet.size()); nodeSet.addAll(otherSet); assertEquals(4, nodeSet.size()); assertTrue(nodeSet.contains(node1)); assertTrue(nodeSet.contains(node2)); assertTrue(nodeSet.contains(node3)); assertTrue(nodeSet.contains(node4)); }