refactored TextFileReverserTests to remove duplication