Add more things to TestUtil
Fix a bug in breakEnd/spanEnd