Port tests from JUnit to TestNG
Fix selector precedence

- inline style attribute wins over rules in <style> block, rules in <style> block
win over rules from external stylesheets
- id selector wins over class selector, class selector wins over element selector