Re-factoring the test for "compose": using "beforeEach"

Small change. I re-factored the duplicate set-up in both test cases to happen in "beforeEach".