cleaning up the tests and removing some duplicate code and applied composed actions.