asserting lines read correctly with line numbers, refactoring to static method.