Refactored SWT tests. Fixes #607