Improved the contact sensor tests