Removed the sysout debug statement now the test passes again in travis-ci. I also revised the comment to make the purpose of the extra code clearer.