Update JTA sample tests to work on Windows

Rather than hard-coding assumptions about the line endings, use a
PrintWriter to produce the multi-line expected output