Refactor and cleanup StringUtil class testing.