@@ -0,0 +1,1939 @@
+/*%0A * Copyright (c) 2012-2013 Ray A. Conner%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a%0A * copy of this software and associated documentation files (the%0A * %22Software%22), to deal in the Software without restriction, including%0A * without limitation the rights to use, copy, modify, merge, publish,%0A * distribute, sublicense, and/or sell copies of the Software, and to%0A * permit persons to whom the Software is furnished to do so, subject to%0A * the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included%0A * in all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS%0A * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF%0A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.%0A * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY%0A * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,%0A * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE%0A * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0A%0Apackage com.github.rconner.anansi;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.NoSuchElementException;%0A%0Apublic class TraversalMoveTest %7B%0A%0A    // This test class is exercising TraversalMove.rootIterator(T).next() when the iterator is exhausted.%0A    // The classes which use the package-private TraversalMove never call next() without having tested hasNext()%0A    // first, so this logic is not otherwise executed.%0A%0A    @Test%0A    public void rootIteratorNotExhausted() %7B%0A        TraversalMove%3CString, String%3E move = TraversalMove.start( %22A%22 );%0A        move.iterator.next();%0A    %7D%0A%0A    @Test( expected = NoSuchElementException.class )%0A    public void rootIteratorExhausted() %7B%0A        TraversalMove%3CString, String%3E move = TraversalMove.start( %22A%22 );%0A        move.iterator.next();%0A        move.iterator.next();%0A    %7D%0A%7D%0A

Add a test to exhaust a root-node traversal iterator.