This is code similar to what
we had a few months ago in a demonstration of JUnit and some eXtreme
Programming methods, except that code was even more complicated: there was no
function “between”.Instead, there
were another six to ten lines of code here.The code did both the traversal and the processing and therefore
violates the single responsibility principle.