### Question:
RedBlackTree implements Iterable<RedBlackEntry<K, V>> { public RedBlackEntry<K, V> getFirst() { return minEntry; } RedBlackTree(); int size(); boolean containsKey(K key); RedBlackEntry<K, V> getFirst(); RedBlackEntry<K, V> getLast(); RedBlackEntry<K, V> getEntryLessThanEqual(K key); RedBlackEntry<K, V> getEntryGreaterThanEqual(K key); V put(K key, V value); RedBlackEntry<K, V> getOrCreateEntry(K key); RedBlackEntry<K, V> getEntry(K key); V remove(K key); void removeNode(RedBlackEntry<K, V> node); void removeAll(); boolean isEmpty(); @Override ListIterator<RedBlackEntry<K, V>> iterator(); ListIterator<RedBlackEntry<K, V>> iterator(boolean forward); @SuppressWarnings("unchecked") ListIterator<RedBlackEntry<K, V>> iterator(RedBlackEntry<K, V> firstEntry,
			boolean forward); ListIterator<RedBlackEntry<K, V>> iterator(K key, boolean forward); void deleteEntry(RedBlackEntry<K, V> p);  }### Answer:
@Test public void testGetNextNode() { RedBlackEntry<Integer, String> node = tree.getFirst(); assertEquals("one", node.value); node = node.getSuccessor(); assertEquals("two", node.value); node = node.getSuccessor(); assertEquals("three", node.value); node = node.getSuccessor(); assertEquals("four", node.value); node = node.getSuccessor(); assertEquals("five", node.value); node = node.getSuccessor(); assertEquals("six", node.value); node = node.getSuccessor(); assertEquals("seven", node.value); node = node.getSuccessor(); assertEquals("nine", node.value); node = node.getSuccessor(); assertEquals("ten", node.value); node = node.getSuccessor(); assertNull(node); }