refactor intention tests to remove duplication

my previous commit made it unnecessary to add `.stripMargin.replace("\r", "").trim` to every code snippet in intention tests
this commit is basically a cleanup