Refactor test
Implement setup and teardown
Add some property setAttr checks
Re-order to make this function cleaner