Add tests

* Add basic tests for plugin
* Change deprecation of `getSelection()`