Removed repeated Code from Tests